[med-svn] [pftools] 03/07: New upstream version 3

Andreas Tille tille at debian.org
Mon Mar 27 11:54:57 UTC 2017


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

tille pushed a commit to branch master
in repository pftools.

commit 92d286cceb91c7b1bddf7a8f7586be6a312787dc
Author: Andreas Tille <tille at debian.org>
Date:   Fri Mar 24 16:03:13 2017 +0100

    New upstream version 3
---
 AUTHORS                                  |    5 +
 COPYING                                  |  674 +++
 ChangeLog                                |    0
 INSTALL                                  |  365 ++
 Makefile                                 |  901 +++-
 Makefile.am                              |    3 +
 Makefile.in                              |  789 +++
 NEWS                                     |    0
 README                                   |  170 +-
 aclocal.m4                               | 1454 ++++++
 compile                                  |  143 +
 config.guess                             | 1545 ++++++
 config.log                               | 2144 ++++++++
 config.status                            | 1247 +++++
 config.sub                               | 1791 +++++++
 configure                                | 7939 ++++++++++++++++++++++++++++++
 configure.ac                             |  221 +
 CVPBR322 => data/CVPBR322                |    0
 GTPA_HUMAN => data/GTPA_HUMAN            |    0
 MYSA_HUMAN => data/MYSA_HUMAN            |    0
 R76849.seq => data/R76849.seq            |    0
 blosum100.cmp => data/blosum100.cmp      |    0
 blosum30.cmp => data/blosum30.cmp        |    0
 blosum45.cmp => data/blosum45.cmp        |    0
 blosum50.cmp => data/blosum50.cmp        |    0
 blosum62.cmp => data/blosum62.cmp        |    0
 blosum65.cmp => data/blosum65.cmp        |    0
 blosum80.cmp => data/blosum80.cmp        |    0
 coils.prf => data/coils.prf              |    0
 ecp.prf => data/ecp.prf                  |    0
 gonnet.cmp => data/gonnet.cmp            |    0
 pam120.cmp => data/pam120.cmp            |    0
 pam160.cmp => data/pam160.cmp            |    0
 pam200.cmp => data/pam200.cmp            |    0
 pam220.cmp => data/pam220.cmp            |    0
 pam250.cmp => data/pam250.cmp            |    0
 pam30.cmp => data/pam30.cmp              |    0
 pam40.cmp => data/pam40.cmp              |    0
 pam400.cmp => data/pam400.cmp            |    0
 pam80.cmp => data/pam80.cmp              |    0
 pfam_sh3.hmm => data/pfam_sh3.hmm        |    0
 data/pfam_sh3.prf                        |  235 +
 prosite13.prf => data/prosite13.prf      |    0
 score.lis => data/score.lis              |    0
 sh3.gpr => data/sh3.gpr                  |    0
 sh3.msf => data/sh3.msf                  |    0
 sh3.prf => data/sh3.prf                  |    0
 sh3.seq => data/sh3.seq                  |    0
 standard.random => data/standard.random  |    0
 test.out => data/test.out                |  346 +-
 test.sh => data/test.sh                  |   34 +-
 depcomp                                  |  630 +++
 profile.txt => doc/profile.txt           |    0
 install-sh                               |  520 ++
 install_pftools.sh                       |  228 -
 io.c                                     |   15 -
 jprsm.f                                  |   97 -
 man/2ft.1                                |  121 +-
 man/6ft.1                                |  117 +-
 man/gtop.1                               |  260 +-
 man/htop.1                               |  383 +-
 man/pfmake.1                             |  536 +-
 man/pfscale.1                            |  308 +-
 man/pfscan.1                             |  409 +-
 man/pfsearch.1                           |  415 --
 man/pfsearchV2.1                         |  133 +
 man/pfw.1                                |  222 +-
 man/psa.5                                |  197 -
 man/psa2msa.1                            |  251 +-
 man/ptof.1                               |  306 +-
 man/ptoh.1                               |  289 +-
 man/xpsa.5                               |  396 --
 missing                                  |  376 ++
 pfscan.1                                 |  416 --
 pfsearch.f                               |  923 ----
 psa.5                                    |  197 -
 src/C/.deps/pfdump-io.Po                 |  170 +
 src/C/.deps/pfsearchV3-pfsearch.Po       |  210 +
 src/C/Makefile                           |  554 +++
 src/C/Makefile.am                        |   40 +
 src/C/Makefile.in                        |  554 +++
 src/C/a.out                              |  Bin 0 -> 36296 bytes
 src/C/generic/heuristic.c                |  747 +++
 src/C/generic/xali1_old.c                |  410 ++
 src/C/generic/xalip.c                    |  790 +++
 src/C/include/config.h                   |  216 +
 src/C/include/config.h.in                |  215 +
 src/C/include/profile.h                  |  737 +++
 src/C/include/sequence.h                 |  115 +
 src/C/include/stamp-h1                   |    1 +
 src/C/include/system.h                   |  950 ++++
 src/C/pfdunp                             |  Bin 0 -> 36296 bytes
 src/C/prg/numa_threads.h                 |  850 ++++
 src/C/prg/pfsearch.c                     | 1566 ++++++
 src/C/prg/testHeuristic.c                |  366 ++
 src/C/prg/testHeuristicMatchDeletion.c   |   67 +
 src/C/prg/testXali1.c                    |  681 +++
 src/C/prg/testheader.c                   |   35 +
 src/C/prg/threads.h                      |  375 ++
 src/C/sse2/heuristic_sse2.c              |  395 ++
 src/C/sse2/sse2_inline_fcts.h            |  113 +
 src/C/sse2/xali1_sse2.c                  |  245 +
 src/C/sse2/xalip_sse2.c                  |  785 +++
 src/C/sse2/xalit_sse2.c                  |  628 +++
 src/C/sse41/heuristic_sse41.c            |  427 ++
 src/C/sse41/xali1_sse41.c                |  280 ++
 src/C/sse41/xalip_sse41.c                |  808 +++
 src/C/sse41/xalit_sse41.c                |  567 +++
 src/C/utils/Normalization.c              |  176 +
 src/C/utils/ReadSequence.c               |  324 ++
 src/C/utils/io.c                         | 1201 +++++
 src/C/utils/output.c                     |  242 +
 2ft.f => src/Fortran/2ft.f               |    4 +-
 6ft.f => src/Fortran/6ft.f               |    4 +-
 CFAve.f => src/Fortran/CFAve.f           |    2 +-
 CPAve.f => src/Fortran/CPAve.f           |    2 +-
 src/Fortran/Makefile                     |  546 ++
 src/Fortran/Makefile.am                  |   19 +
 src/Fortran/Makefile.in                  |  546 ++
 NtoR.f => src/Fortran/NtoR.f             |    2 +-
 RtoN.f => src/Fortran/RtoN.f             |    2 +-
 Xblnk.f => src/Fortran/Xblnk.f           |    2 +-
 abini.f => src/Fortran/abini.f           |    2 +-
 ardim.f => src/Fortran/ardim.f           |    2 +-
 avdat.f => src/Fortran/avdat.f           |    2 +-
 codat.f => src/Fortran/codat.f           |    2 +-
 cvini.f => src/Fortran/cvini.f           |    2 +-
 dfdat.f => src/Fortran/dfdat.f           |    2 +-
 dfnul.f => src/Fortran/dfnul.f           |    2 +-
 djdat.f => src/Fortran/djdat.f           |    2 +-
 gsdat.f => src/Fortran/gsdat.f           |    2 +-
 gtop.f => src/Fortran/gtop.f             |    4 +-
 hmdat.f => src/Fortran/hmdat.f           |    2 +-
 htop.f => src/Fortran/htop.f             |    4 +-
 src/Fortran/io.c                         |   15 +
 lblnk.f => src/Fortran/lblnk.f           |    2 +-
 nodat.f => src/Fortran/nodat.f           |    2 +-
 pfdat.f => src/Fortran/pfdat.f           |    2 +-
 pfind.f => src/Fortran/pfind.f           |    2 +-
 pfmake.f => src/Fortran/pfmake.f         |   11 +-
 pfscale.f => src/Fortran/pfscale.f       |    4 +-
 pfscan.f => src/Fortran/pfscan.f         |    4 +-
 pfsearch.f.cpy => src/Fortran/pfsearch.f |    2 +-
 src/Fortran/pfsearchV2.f                 |  550 +++
 pfw.f => src/Fortran/pfw.f               |    4 +-
 pmali.f => src/Fortran/pmali.f           |    2 +-
 prali.f => src/Fortran/prali.f           |    2 +-
 prsp.f => src/Fortran/prsp.f             |    2 +-
 prxp.f => src/Fortran/prxp.f             |    2 +-
 psa2msa.f => src/Fortran/psa2msa.f       |    4 +-
 psdat.f => src/Fortran/psdat.f           |    2 +-
 ptof.f => src/Fortran/ptof.f             |    4 +-
 ptoh.f => src/Fortran/ptoh.f             |    4 +-
 pxdat.f => src/Fortran/pxdat.f           |    2 +-
 recmd.f => src/Fortran/recmd.f           |    2 +-
 regpr.f => src/Fortran/regpr.f           |    2 +-
 remsa.f => src/Fortran/remsa.f           |    2 +-
 remsf.f => src/Fortran/remsf.f           |    2 +-
 reprf.f => src/Fortran/reprf.f           |    2 +-
 reseq.f => src/Fortran/reseq.f           |    2 +-
 rfseq.f => src/Fortran/rfseq.f           |    4 +-
 rhmmer.f => src/Fortran/rhmmer.f         |    2 +-
 rhmmer2.f => src/Fortran/rhmmer2.f       |    2 +-
 rhnul.f => src/Fortran/rhnul.f           |    2 +-
 schmm.f => src/Fortran/schmm.f           |    2 +-
 sterr.f => src/Fortran/sterr.f           |    2 +-
 wprsm.f => src/Fortran/wprsm.f           |    2 +-
 wrhmr.f => src/Fortran/wrhmr.f           |    2 +-
 wrprf.f => src/Fortran/wrprf.f           |    2 +-
 wrsam.f => src/Fortran/wrsam.f           |    2 +-
 xali1.f => src/Fortran/xali1.f           |    2 +-
 xalip.f => src/Fortran/xalip.f           |    2 +-
 xalit.f => src/Fortran/xalit.f           |    2 +-
 xprsm.f => src/Fortran/xprsm.f           |   16 +-
 xpsa.5                                   |  370 --
 175 files changed, 39368 insertions(+), 6428 deletions(-)

diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..8fd2bc3
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,5 @@
+Philipp Bucher (philipp.bucher at epfl.ch)
+
+Lorenzo Cerruti (lorenzo.cerruti at isb-sib.ch)
+
+Thierry Schuepbach (thierry.schuepbach at isb-sib.ch)
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..94a9ed0
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,674 @@
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  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
+them 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 prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  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.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                       TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+  To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+  To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+  An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+  1. Source Code.
+
+  The "source code" for a work means the preferred form of the work
+for making modifications to it.  "Object code" means any non-source
+form of a work.
+
+  A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+  The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+  The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+  The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+  The Corresponding Source for a work in source code form is that
+same work.
+
+  2. Basic Permissions.
+
+  All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+  You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+  Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+  No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+  When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+  4. Conveying Verbatim Copies.
+
+  You may convey 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;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+  You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+  5. Conveying Modified Source Versions.
+
+  You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+    a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.
+
+    b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    "keep intact all notices".
+
+    c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.
+
+    d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.
+
+  A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+  6. Conveying Non-Source Forms.
+
+  You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+    a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.
+
+    b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.
+
+    c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.
+
+    d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.
+
+    e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.
+
+  A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+  A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+  "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+  If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+  The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+  Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+  7. Additional Terms.
+
+  "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+  When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+  Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+    a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or
+
+    b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or
+
+    c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or
+
+    d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or
+
+    f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.
+
+  All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+  If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+  Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+  8. Termination.
+
+  You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+  However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+  Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+  Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+  9. Acceptance Not Required for Having Copies.
+
+  You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+  10. Automatic Licensing of Downstream Recipients.
+
+  Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.
+
+  An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+  You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+  11. Patents.
+
+  A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor's "contributor version".
+
+  A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+  Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+  In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+  If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+  If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+  A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+  Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+  12. No Surrender of Others' Freedom.
+
+  If 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 convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+  13. Use with the GNU Affero General Public License.
+
+  Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+  14. Revised Versions of this License.
+
+  The Free Software Foundation may publish revised and/or new versions of
+the GNU 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 that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+  If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+  Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+  15. Disclaimer of Warranty.
+
+  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.
+
+  16. Limitation of Liability.
+
+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+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.
+
+  17. Interpretation of Sections 15 and 16.
+
+  If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+                     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
+state 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 3 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, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+  If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+    <program>  Copyright (C) <year>  <name of author>
+    This program 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, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+  You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+  The GNU 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 Lesser General
+Public License instead of this License.  But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..e69de29
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..7d1c323
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,365 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
+2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+
+   Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.  This file is offered as-is,
+without warranty of any kind.
+
+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.  Some packages provide this
+`INSTALL' file but do not implement all of the features documented
+below.  The lack of an optional feature in a given package is not
+necessarily a bug.  More recommendations for GNU packages can be found
+in *note Makefile Conventions: (standards)Makefile Conventions.
+
+   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, generally using the just-built uninstalled binaries.
+
+  4. Type `make install' to install the programs and any data files and
+     documentation.  When installing into a prefix owned by root, it is
+     recommended that the package be configured and built as a regular
+     user, and only the `make install' phase executed with root
+     privileges.
+
+  5. Optionally, type `make installcheck' to repeat any self-tests, but
+     this time using the binaries in their final installed location.
+     This target does not install anything.  Running this target as a
+     regular user, particularly if the prior `make install' required
+     root privileges, verifies that the installation completed
+     correctly.
+
+  6. 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.
+
+  7. Often, you can also type `make uninstall' to remove the installed
+     files again.  In practice, not all packages have tested that
+     uninstallation works correctly, even though it is required by the
+     GNU Coding Standards.
+
+  8. Some packages, particularly those that use Automake, provide `make
+     distcheck', which can by used by developers to test that all other
+     targets like `make install' and `make uninstall' work correctly.
+     This target is generally not run by end users.
+
+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 `..'.  This
+is known as a "VPATH" build.
+
+   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.
+
+   On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple `-arch' options to the
+compiler but only a single `-arch' option to the preprocessor.  Like
+this:
+
+     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CPP="gcc -E" CXXCPP="g++ -E"
+
+   This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the `lipo' tool if you have problems.
+
+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', where PREFIX must be an
+absolute file name.
+
+   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.  In general, the
+default for these options is expressed in terms of `${prefix}', so that
+specifying just `--prefix' will affect all of the other directory
+specifications that were not explicitly provided.
+
+   The most portable way to affect installation locations is to pass the
+correct locations to `configure'; however, many packages provide one or
+both of the following shortcuts of passing variable assignments to the
+`make install' command line to change installation locations without
+having to reconfigure or recompile.
+
+   The first method involves providing an override variable for each
+affected directory.  For example, `make install
+prefix=/alternate/directory' will choose an alternate location for all
+directory configuration variables that were expressed in terms of
+`${prefix}'.  Any directories that were specified during `configure',
+but not in terms of `${prefix}', must each be overridden at install
+time for the entire installation to be relocated.  The approach of
+makefile variable overrides for each directory variable is required by
+the GNU Coding Standards, and ideally causes no recompilation.
+However, some platforms have known limitations with the semantics of
+shared libraries that end up requiring recompilation when using this
+method, particularly noticeable in packages that use GNU Libtool.
+
+   The second method involves providing the `DESTDIR' variable.  For
+example, `make install DESTDIR=/alternate/directory' will prepend
+`/alternate/directory' before all installation names.  The approach of
+`DESTDIR' overrides is not required by the GNU Coding Standards, and
+does not work on platforms that have drive letters.  On the other hand,
+it does better at avoiding recompilation issues, and works well even
+when some directory options were not specified in terms of `${prefix}'
+at `configure' time.
+
+Optional Features
+=================
+
+   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'.
+
+   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.
+
+   Some packages offer the ability to configure how verbose the
+execution of `make' will be.  For these packages, running `./configure
+--enable-silent-rules' sets the default to minimal output, which can be
+overridden with `make V=1'; while running `./configure
+--disable-silent-rules' sets the default to verbose, which can be
+overridden with `make V=0'.
+
+Particular systems
+==================
+
+   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
+CC is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
+a workaround.  If GNU CC is not installed, it is therefore recommended
+to try
+
+     ./configure CC="cc"
+
+and if that doesn't work, try
+
+     ./configure CC="cc -nodtk"
+
+   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
+directory contains several dysfunctional programs; working variants of
+these programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
+in your `PATH', put it _after_ `/usr/bin'.
+
+   On Haiku, software installed for all users goes in `/boot/common',
+not `/usr/local'.  It is recommended to use the following options:
+
+     ./configure --prefix=/boot/common
+
+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 all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+     Print a summary of the options unique to this package's
+     `configure', and exit.  The `short' variant lists options used
+     only in the top level, while the `recursive' variant lists options
+     also present in any nested packages.
+
+`--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.
+
+`--prefix=DIR'
+     Use DIR as the installation prefix.  *note Installation Names::
+     for more details, including other options available for fine-tuning
+     the installation locations.
+
+`--no-create'
+`-n'
+     Run the configure checks, but stop before creating any output
+     files.
+
+`configure' also accepts some other, not widely useful, options.  Run
+`configure --help' for more details.
+
diff --git a/Makefile b/Makefile
index 45b8b2b..a3ec4ef 100644
--- a/Makefile
+++ b/Makefile
@@ -1,112 +1,789 @@
-# M A K E F I L E   F O R   P F T O O L S  R E L E A S E  2.3
-#----------------------------------------------------------------------#
-# $Id: Makefile,v 2.16 2003/11/28 11:54:37 vflegel Exp $
-#----------------------------------------------------------------------#
-
-PROGS = gtop pfmake pfscan pfw ptoh htop \
-        pfscale pfsearch psa2msa 2ft 6ft ptof
-MANS =  gtop.1 pfmake.1 pfscan.1 pfw.1 ptoh.1 htop.1 pfscale.1 \
-        pfsearch.1 psa2msa.1 2ft.1 6ft.1 ptof.1 psa.5 xpsa.5
-
-F77   = gfortran
-CC    = gcc
-#FFLAGS= -O2 -init-local-zero -fno-automatic io.o
-#FFLAGS= -O2 -finit-local-zero -fno-automatic io.o
-FFLAGS= -O2 -fno-automatic io.o
-#PRFLAG= -g -pg
-
-
-# For MAC OX X SnowLeopard we need to specify the 32bit architecture for gcc
-#CFLAGS= -m32
-# otherwise keep it empty
-CFLAGS=
-
-
-#----------------------------------------------------------------------#
-# Location of package installation directory
-#
-PKGDIR = /usr/share/pftools23
-#----------------------------------------------------------------------#
-#
-# Compilation with native fortran compilers (f77)
-#
-#F77  = f77
-#CC   = cc
-#
-# sunos / solaris
-#FFLAGS= -cg89 -O4
-#
-# HP-UX 
-#FFLAGS= +O4 +E4 +E6 +U77 -K
-#
-# IRIX 
-#FFLAGS= -O2 -static
-#
-# AIX 3.2.5
-#FFLAGS= -qcharlen=1024  -O3
-#
-# Tru64 UNIX V5.1A
-#FFLAGS= -noautomatic -fast -g0
-#----------------------------------------------------------------------#
-
-all  :  io.o $(PROGS)
-
-install: $(PROGS)
-	./install_pftools.sh $(PKGDIR)
-
-clean:
-	rm $(PROGS) io.o
-
-io.o :  io.c 
-	$(CC) -c io.c -o io.o $(CFLAGS) $(PRFLAG)
-
-gtop :  gtop.f io.o psdat.f gsdat.f djdat.f nodat.f codat.f pfdat.f dfdat.f \
-        sterr.f cvini.f lblnk.f regpr.f wrprf.f sterr.f ardim.f
-	$(F77) $(FFLAGS) gtop.f -o gtop $(PRFLAG)
-
-htop :  htop.f codat.f cvini.f dfdat.f djdat.f gsdat.f lblnk.f nodat.f \
-        pfdat.f pfind.f psdat.f rhmmer.f rhmmer2.f rhnul.f sterr.f wrprf.f recmd.f ardim.f
-	$(F77) $(FFLAGS) htop.f -o htop $(PRFLAG)
-
-pfsearch : pfsearch.f gsdat.f djdat.f nodat.f codat.f pfdat.f dfdat.f pxdat.f \
-        avdat.f sterr.f cvini.f reprf.f reseq.f rfseq.f xali1.f xalip.f \
-        RtoN.f NtoR.f CFAve.f CPAve.f wprsm.f xprsm.f xalit.f lblnk.f prali.f sterr.f \
-        pmali.f ardim.f prsp.f prxp.f Xblnk.f jprsm.f
-	$(F77) $(FFLAGS) pfsearch.f -o pfsearch $(PRFLAG)
-
-pfscan : pfscan.f psdat.f gsdat.f djdat.f nodat.f codat.f pfdat.f dfdat.f \
-        pxdat.f avdat.f sterr.f cvini.f abini.f reprf.f reseq.f rfseq.f \
-        xali1.f xalip.f RtoN.f NtoR.f CFAve.f CPAve.f wprsm.f  xprsm.f xalit.f lblnk.f \
-        prali.f ardim.f prsp.f prxp.f Xblnk.f
-	$(F77) $(FFLAGS) pfscan.f -o pfscan $(PRFLAG)
-
-psa2msa : psa2msa.f ardim.f io.o sterr.f lblnk.f   
-	$(F77) $(FFLAGS) psa2msa.f -o psa2msa $(PRFLAG)
-
-pfmake : pfmake.f psdat.f gsdat.f djdat.f nodat.f codat.f pfdat.f dfdat.f \
-        sterr.f cvini.f remsf.f wrprf.f lblnk.f remsf.f wrprf.f lblnk.f recmd.f \
-        remsa.f Xblnk.f
-	$(F77) $(FFLAGS) pfmake.f -o pfmake  $(PRFLAG)
-
-ptoh :  ptoh.f psdat.f gsdat.f djdat.f nodat.f codat.f pfdat.f dfdat.f sterr.f \
-        hmdat.f cvini.f reprf.f rhnul.f wrsam.f wrhmr.f schmm.f dfnul.f lblnk.f \
-        ardim.f Xblnk.f
-	$(F77) $(FFLAGS) ptoh.f -o ptoh $(PRFLAG)
-
-pfw :   pfw.f sterr.f remsf.f lblnk.f remsa.f
-	$(F77) $(FFLAGS) pfw.f -o pfw  $(PRFLAG)
-
-pfscale : pfscale.f sterr.f recmd.f ardim.f psdat.f gsdat.f djdat.f nodat.f codat.f \
-          pfdat.f dfdat.f sterr.f cvini.f reprf.f wrprf.f recmd.f NtoR.f lblnk.f ardim.f \
-          Xblnk.f
-	$(F77) $(FFLAGS) pfscale.f -o pfscale 
-
-2ft :   2ft.f lblnk.f ardim.f sterr.f
-	$(F77) $(FFLAGS) 2ft.f -o 2ft  $(PRFLAG)
-
-6ft :   6ft.f lblnk.f ardim.f sterr.f
-	$(F77) $(FFLAGS) 6ft.f -o 6ft $(PRFLAG)
-
-ptof :  ptof.f codat.f cvini.f dfdat.f djdat.f gsdat.f lblnk.f nodat.f pfdat.f \
-        psdat.f reprf.f sterr.f wrprf.f recmd.f ardim.f Xblnk.f
-	$(F77) $(FFLAGS) ptof.f -o ptof $(PRFLAG)
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.  Generated from Makefile.in by configure.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+pkgdatadir = $(datadir)/pftools
+pkgincludedir = $(includedir)/pftools
+pkglibdir = $(libdir)/pftools
+pkglibexecdir = $(libexecdir)/pftools
+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 = x86_64-unknown-linux-gnu
+host_triplet = x86_64-unknown-linux-gnu
+target_triplet = x86_64-unknown-linux-gnu
+subdir = .
+DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in $(top_srcdir)/configure \
+	$(top_srcdir)/src/C/include/config.h.in AUTHORS COPYING \
+	ChangeLog INSTALL NEWS compile config.guess config.sub depcomp \
+	install-sh missing
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(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/C/include/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
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+man1dir = $(mandir)/man1
+am__installdirs = "$(DESTDIR)$(man1dir)"
+NROFF = nroff
+MANS = $(man_MANS)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+  distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+	$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+	distdir dist dist-all distcheck
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+  { test ! -d "$(distdir)" \
+    || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+         && rm -fr "$(distdir)"; }; }
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = ${SHELL} /home/lcerutti/home/projects/prosite/prfh/pftools/branches/pftools/missing --run aclocal-1.11
+ALLOCA = 
+AMTAR = ${SHELL} /home/lcerutti/home/projects/prosite/prfh/pftools/branches/pftools/missing --run tar
+AUTOCONF = ${SHELL} /home/lcerutti/home/projects/prosite/prfh/pftools/branches/pftools/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/lcerutti/home/projects/prosite/prfh/pftools/branches/pftools/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/lcerutti/home/projects/prosite/prfh/pftools/branches/pftools/missing --run automake-1.11
+AWK = mawk
+CC = gcc -std=gnu99
+CCDEPMODE = depmode=gcc3
+CFLAGS = -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse
+CPP = 
+CPPFLAGS = 
+CYGPATH_W = echo
+DEFS = -DHAVE_CONFIG_H
+DEPDIR = .deps
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = 
+EXEEXT = 
+F77 = gfortran
+FFLAGS = -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse
+FPP_OPTION = -cpp
+GREP = 
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+INTEL_IMF = 
+LDFLAGS = 
+LIBOBJS =  ${LIBOBJDIR}malloc$U.o
+LIBS = -lm 
+LTLIBOBJS =  ${LIBOBJDIR}malloc$U.lo
+MAKEINFO = ${SHELL} /home/lcerutti/home/projects/prosite/prfh/pftools/branches/pftools/missing --run makeinfo
+MKDIR_P = /bin/mkdir -p
+OBJEXT = o
+PACKAGE = pftools
+PACKAGE_BUGREPORT = thierry.schuepbach at isb-sib.ch
+PACKAGE_NAME = PfTools
+PACKAGE_STRING = PfTools 3.0
+PACKAGE_TARNAME = pftools
+PACKAGE_URL = 
+PACKAGE_VERSION = 3.0
+PATH_SEPARATOR = :
+PTHREAD_CC = gcc -std=gnu99
+PTHREAD_CFLAGS = -pthread
+PTHREAD_LIBS = 
+SET_MAKE = 
+SHELL = /bin/bash
+SIMD_SSE2_CFLAGS = -msse2
+SIMD_SSE4_1_CFLAGS = -msse4.1
+STRIP = 
+USE_AFFINITY = -D__USE_AFFINITY__
+USE_MMAP = -D__USE_MMAP__
+VERSION = 3.0
+abs_builddir = /home/lcerutti/home/projects/prosite/prfh/pftools/branches/pftools
+abs_srcdir = /home/lcerutti/home/projects/prosite/prfh/pftools/branches/pftools
+abs_top_builddir = /home/lcerutti/home/projects/prosite/prfh/pftools/branches/pftools
+abs_top_srcdir = /home/lcerutti/home/projects/prosite/prfh/pftools/branches/pftools
+ac_ct_CC = gcc
+ac_ct_F77 = gfortran
+am__include = include
+am__leading_dot = .
+am__quote = 
+am__tar = ${AMTAR} chof - "$$tardir"
+am__untar = ${AMTAR} xf -
+ax_pthread_config = 
+bindir = ${exec_prefix}/bin
+build = x86_64-unknown-linux-gnu
+build_alias = 
+build_cpu = x86_64
+build_os = linux-gnu
+build_vendor = unknown
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = x86_64-unknown-linux-gnu
+host_alias = 
+host_cpu = x86_64
+host_os = linux-gnu
+host_vendor = unknown
+htmldir = ${docdir}
+includedir = ${prefix}/include
+infodir = ${datarootdir}/info
+install_sh = ${SHELL} /home/lcerutti/home/projects/prosite/prfh/pftools/branches/pftools/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+mandir = ${datarootdir}/man
+mkdir_p = /bin/mkdir -p
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+prefix = /usr/local
+program_transform_name = s,x,x,
+psdir = ${docdir}
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = ${prefix}/etc
+target = x86_64-unknown-linux-gnu
+target_alias = 
+target_cpu = x86_64
+target_os = linux-gnu
+target_vendor = unknown
+top_build_prefix = 
+top_builddir = .
+top_srcdir = .
+SUBDIRS = src/Fortran src/C
+man_MANS = man/2ft.1  man/6ft.1  man/gtop.1  man/htop.1  man/pfmake.1  man/pfscale.1 \
+           man/pfscan.1  man/pfsearchV2.1  man/pfw.1 man/psa2msa.1  man/ptof.1  man/ptoh.1
+
+all: all-recursive
+
+.SUFFIXES:
+am--refresh:
+	@:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
+	      $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    echo ' $(SHELL) ./config.status'; \
+	    $(SHELL) ./config.status;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	$(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	$(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+
+src/C/include/config.h: src/C/include/stamp-h1
+	@if test ! -f $@; then \
+	  rm -f src/C/include/stamp-h1; \
+	  $(MAKE) $(AM_MAKEFLAGS) src/C/include/stamp-h1; \
+	else :; fi
+
+src/C/include/stamp-h1: $(top_srcdir)/src/C/include/config.h.in $(top_builddir)/config.status
+	@rm -f src/C/include/stamp-h1
+	cd $(top_builddir) && $(SHELL) ./config.status src/C/include/config.h
+$(top_srcdir)/src/C/include/config.h.in:  $(am__configure_deps) 
+	($(am__cd) $(top_srcdir) && $(AUTOHEADER))
+	rm -f src/C/include/stamp-h1
+	touch $@
+
+distclean-hdr:
+	-rm -f src/C/include/config.h src/C/include/stamp-h1
+install-man1: $(man_MANS)
+	@$(NORMAL_INSTALL)
+	test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
+	@list=''; test -n "$(man1dir)" || exit 0; \
+	{ for i in $$list; do echo "$$i"; done; \
+	l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+	  sed -n '/\.1[a-z]*$$/p'; \
+	} | while read p; do \
+	  if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; echo "$$p"; \
+	done | \
+	sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+	sed 'N;N;s,\n, ,g' | { \
+	list=; while read file base inst; do \
+	  if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+	    echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+	    $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
+	  fi; \
+	done; \
+	for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+	while read files; do \
+	  test -z "$$files" || { \
+	    echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
+	    $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
+	done; }
+
+uninstall-man1:
+	@$(NORMAL_UNINSTALL)
+	@list=''; test -n "$(man1dir)" || exit 0; \
+	files=`{ for i in $$list; do echo "$$i"; done; \
+	l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+	  sed -n '/\.1[a-z]*$$/p'; \
+	} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+	test -z "$$files" || { \
+	  echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
+	  cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
+
+# 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)
+	@list='$(MANS)'; if test -n "$$list"; then \
+	  list=`for p in $$list; do \
+	    if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+	    if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
+	  if test -n "$$list" && \
+	    grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
+	    echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
+	    grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/         /' >&2; \
+	    echo "       to fix them, install help2man, remove and regenerate the man pages;" >&2; \
+	    echo "       typically \`make maintainer-clean' will remove them" >&2; \
+	    exit 1; \
+	  else :; fi; \
+	else :; fi
+	$(am__remove_distdir)
+	test -d "$(distdir)" || mkdir "$(distdir)"
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d "$(distdir)/$$subdir" \
+	    || $(MKDIR_P) "$(distdir)/$$subdir" \
+	    || exit 1; \
+	  fi; \
+	done
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+	    $(am__relativize); \
+	    new_distdir=$$reldir; \
+	    dir1=$$subdir; dir2="$(top_distdir)"; \
+	    $(am__relativize); \
+	    new_top_distdir=$$reldir; \
+	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+	    ($(am__cd) $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$$new_top_distdir" \
+	        distdir="$$new_distdir" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
+		am__skip_mode_fix=: \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+	-test -n "$(am__skip_mode_fix)" \
+	|| find "$(distdir)" -type d ! -perm -755 \
+		-exec chmod u+rwx,go+rx {} \; -o \
+	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+	|| chmod -R a+r "$(distdir)"
+dist-gzip: distdir
+	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__remove_distdir)
+
+dist-bzip2: distdir
+	tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+	$(am__remove_distdir)
+
+dist-lzma: distdir
+	tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
+	$(am__remove_distdir)
+
+dist-xz: distdir
+	tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
+	$(am__remove_distdir)
+
+dist-tarZ: distdir
+	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+	$(am__remove_distdir)
+
+dist-shar: distdir
+	shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+	$(am__remove_distdir)
+
+dist-zip: distdir
+	-rm -f $(distdir).zip
+	zip -rq $(distdir).zip $(distdir)
+	$(am__remove_distdir)
+
+dist dist-all: distdir
+	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration.  Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+	case '$(DIST_ARCHIVES)' in \
+	*.tar.gz*) \
+	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+	*.tar.bz2*) \
+	  bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+	*.tar.lzma*) \
+	  lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
+	*.tar.xz*) \
+	  xz -dc $(distdir).tar.xz | $(am__untar) ;;\
+	*.tar.Z*) \
+	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+	*.shar.gz*) \
+	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+	*.zip*) \
+	  unzip $(distdir).zip ;;\
+	esac
+	chmod -R a-w $(distdir); chmod a+w $(distdir)
+	mkdir $(distdir)/_build
+	mkdir $(distdir)/_inst
+	chmod a-w $(distdir)
+	test -d $(distdir)/_build || exit 0; \
+	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+	  && am__cwd=`pwd` \
+	  && $(am__cd) $(distdir)/_build \
+	  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+	    $(DISTCHECK_CONFIGURE_FLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
+	  && $(MAKE) $(AM_MAKEFLAGS) check \
+	  && $(MAKE) $(AM_MAKEFLAGS) install \
+	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+	  && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+	  && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+	        distuninstallcheck \
+	  && chmod -R a-w "$$dc_install_base" \
+	  && ({ \
+	       (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+	            distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+	      } || { rm -rf "$$dc_destdir"; exit 1; }) \
+	  && rm -rf "$$dc_destdir" \
+	  && $(MAKE) $(AM_MAKEFLAGS) dist \
+	  && rm -rf $(DIST_ARCHIVES) \
+	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+	  && cd "$$am__cwd" \
+	  || exit 1
+	$(am__remove_distdir)
+	@(echo "$(distdir) archives ready for distribution: "; \
+	  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+	  sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+distuninstallcheck:
+	@$(am__cd) '$(distuninstallcheck_dir)' \
+	&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+	   || { echo "ERROR: files left after uninstall:" ; \
+	        if test -n "$(DESTDIR)"; then \
+	          echo "  (check DESTDIR support)"; \
+	        fi ; \
+	        $(distuninstallcheck_listfiles) ; \
+	        exit 1; } >&2
+distcleancheck: distclean
+	@if test '$(srcdir)' = . ; then \
+	  echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+	  exit 1 ; \
+	fi
+	@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+	  || { echo "ERROR: files left in build directory after distclean:" ; \
+	       $(distcleancheck_listfiles) ; \
+	       exit 1; } >&2
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(MANS)
+installdirs: installdirs-recursive
+installdirs-am:
+	for dir in "$(DESTDIR)$(man1dir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-hdr distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-man
+
+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-man1
+
+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: uninstall-man
+
+uninstall-man: uninstall-man1
+
+.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-lzma dist-shar dist-tarZ dist-xz dist-zip distcheck \
+	distclean distclean-generic distclean-hdr distclean-tags \
+	distcleancheck distdir distuninstallcheck dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-dvi install-dvi-am install-exec \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-man install-man1 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 uninstall-man uninstall-man1
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..8eb8f4e
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,3 @@
+SUBDIRS = src/Fortran src/C
+man_MANS = man/2ft.1  man/6ft.1  man/gtop.1  man/htop.1  man/pfmake.1  man/pfscale.1 \
+           man/pfscan.1  man/pfsearchV2.1  man/pfw.1 man/psa2msa.1  man/ptof.1  man/ptoh.1
diff --git a/Makefile.in b/Makefile.in
new file mode 100644
index 0000000..34044e5
--- /dev/null
+++ b/Makefile.in
@@ -0,0 +1,789 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ 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 \
+	$(top_srcdir)/src/C/include/config.h.in AUTHORS COPYING \
+	ChangeLog INSTALL NEWS compile config.guess config.sub depcomp \
+	install-sh missing
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(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/C/include/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
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+man1dir = $(mandir)/man1
+am__installdirs = "$(DESTDIR)$(man1dir)"
+NROFF = nroff
+MANS = $(man_MANS)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+  distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+	$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+	distdir dist dist-all distcheck
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+  { test ! -d "$(distdir)" \
+    || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+         && rm -fr "$(distdir)"; }; }
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+FPP_OPTION = @FPP_OPTION@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTEL_IMF = @INTEL_IMF@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SIMD_SSE2_CFLAGS = @SIMD_SSE2_CFLAGS@
+SIMD_SSE4_1_CFLAGS = @SIMD_SSE4_1_CFLAGS@
+STRIP = @STRIP@
+USE_AFFINITY = @USE_AFFINITY@
+USE_MMAP = @USE_MMAP@
+VERSION = @VERSION@
+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_F77 = @ac_ct_F77@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+SUBDIRS = src/Fortran src/C
+man_MANS = man/2ft.1  man/6ft.1  man/gtop.1  man/htop.1  man/pfmake.1  man/pfscale.1 \
+           man/pfscan.1  man/pfsearchV2.1  man/pfw.1 man/psa2msa.1  man/ptof.1  man/ptoh.1
+
+all: all-recursive
+
+.SUFFIXES:
+am--refresh:
+	@:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
+	      $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    echo ' $(SHELL) ./config.status'; \
+	    $(SHELL) ./config.status;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	$(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	$(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+
+src/C/include/config.h: src/C/include/stamp-h1
+	@if test ! -f $@; then \
+	  rm -f src/C/include/stamp-h1; \
+	  $(MAKE) $(AM_MAKEFLAGS) src/C/include/stamp-h1; \
+	else :; fi
+
+src/C/include/stamp-h1: $(top_srcdir)/src/C/include/config.h.in $(top_builddir)/config.status
+	@rm -f src/C/include/stamp-h1
+	cd $(top_builddir) && $(SHELL) ./config.status src/C/include/config.h
+$(top_srcdir)/src/C/include/config.h.in:  $(am__configure_deps) 
+	($(am__cd) $(top_srcdir) && $(AUTOHEADER))
+	rm -f src/C/include/stamp-h1
+	touch $@
+
+distclean-hdr:
+	-rm -f src/C/include/config.h src/C/include/stamp-h1
+install-man1: $(man_MANS)
+	@$(NORMAL_INSTALL)
+	test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
+	@list=''; test -n "$(man1dir)" || exit 0; \
+	{ for i in $$list; do echo "$$i"; done; \
+	l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+	  sed -n '/\.1[a-z]*$$/p'; \
+	} | while read p; do \
+	  if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; echo "$$p"; \
+	done | \
+	sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+	sed 'N;N;s,\n, ,g' | { \
+	list=; while read file base inst; do \
+	  if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+	    echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+	    $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
+	  fi; \
+	done; \
+	for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+	while read files; do \
+	  test -z "$$files" || { \
+	    echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
+	    $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
+	done; }
+
+uninstall-man1:
+	@$(NORMAL_UNINSTALL)
+	@list=''; test -n "$(man1dir)" || exit 0; \
+	files=`{ for i in $$list; do echo "$$i"; done; \
+	l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+	  sed -n '/\.1[a-z]*$$/p'; \
+	} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+	test -z "$$files" || { \
+	  echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
+	  cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
+
+# 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)
+	@list='$(MANS)'; if test -n "$$list"; then \
+	  list=`for p in $$list; do \
+	    if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+	    if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
+	  if test -n "$$list" && \
+	    grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
+	    echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
+	    grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/         /' >&2; \
+	    echo "       to fix them, install help2man, remove and regenerate the man pages;" >&2; \
+	    echo "       typically \`make maintainer-clean' will remove them" >&2; \
+	    exit 1; \
+	  else :; fi; \
+	else :; fi
+	$(am__remove_distdir)
+	test -d "$(distdir)" || mkdir "$(distdir)"
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d "$(distdir)/$$subdir" \
+	    || $(MKDIR_P) "$(distdir)/$$subdir" \
+	    || exit 1; \
+	  fi; \
+	done
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+	    $(am__relativize); \
+	    new_distdir=$$reldir; \
+	    dir1=$$subdir; dir2="$(top_distdir)"; \
+	    $(am__relativize); \
+	    new_top_distdir=$$reldir; \
+	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+	    ($(am__cd) $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$$new_top_distdir" \
+	        distdir="$$new_distdir" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
+		am__skip_mode_fix=: \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+	-test -n "$(am__skip_mode_fix)" \
+	|| find "$(distdir)" -type d ! -perm -755 \
+		-exec chmod u+rwx,go+rx {} \; -o \
+	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+	|| chmod -R a+r "$(distdir)"
+dist-gzip: distdir
+	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__remove_distdir)
+
+dist-bzip2: distdir
+	tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+	$(am__remove_distdir)
+
+dist-lzma: distdir
+	tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
+	$(am__remove_distdir)
+
+dist-xz: distdir
+	tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
+	$(am__remove_distdir)
+
+dist-tarZ: distdir
+	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+	$(am__remove_distdir)
+
+dist-shar: distdir
+	shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+	$(am__remove_distdir)
+
+dist-zip: distdir
+	-rm -f $(distdir).zip
+	zip -rq $(distdir).zip $(distdir)
+	$(am__remove_distdir)
+
+dist dist-all: distdir
+	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration.  Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+	case '$(DIST_ARCHIVES)' in \
+	*.tar.gz*) \
+	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+	*.tar.bz2*) \
+	  bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+	*.tar.lzma*) \
+	  lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
+	*.tar.xz*) \
+	  xz -dc $(distdir).tar.xz | $(am__untar) ;;\
+	*.tar.Z*) \
+	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+	*.shar.gz*) \
+	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+	*.zip*) \
+	  unzip $(distdir).zip ;;\
+	esac
+	chmod -R a-w $(distdir); chmod a+w $(distdir)
+	mkdir $(distdir)/_build
+	mkdir $(distdir)/_inst
+	chmod a-w $(distdir)
+	test -d $(distdir)/_build || exit 0; \
+	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+	  && am__cwd=`pwd` \
+	  && $(am__cd) $(distdir)/_build \
+	  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+	    $(DISTCHECK_CONFIGURE_FLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
+	  && $(MAKE) $(AM_MAKEFLAGS) check \
+	  && $(MAKE) $(AM_MAKEFLAGS) install \
+	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+	  && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+	  && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+	        distuninstallcheck \
+	  && chmod -R a-w "$$dc_install_base" \
+	  && ({ \
+	       (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+	            distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+	      } || { rm -rf "$$dc_destdir"; exit 1; }) \
+	  && rm -rf "$$dc_destdir" \
+	  && $(MAKE) $(AM_MAKEFLAGS) dist \
+	  && rm -rf $(DIST_ARCHIVES) \
+	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+	  && cd "$$am__cwd" \
+	  || exit 1
+	$(am__remove_distdir)
+	@(echo "$(distdir) archives ready for distribution: "; \
+	  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+	  sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+distuninstallcheck:
+	@$(am__cd) '$(distuninstallcheck_dir)' \
+	&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+	   || { echo "ERROR: files left after uninstall:" ; \
+	        if test -n "$(DESTDIR)"; then \
+	          echo "  (check DESTDIR support)"; \
+	        fi ; \
+	        $(distuninstallcheck_listfiles) ; \
+	        exit 1; } >&2
+distcleancheck: distclean
+	@if test '$(srcdir)' = . ; then \
+	  echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+	  exit 1 ; \
+	fi
+	@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+	  || { echo "ERROR: files left in build directory after distclean:" ; \
+	       $(distcleancheck_listfiles) ; \
+	       exit 1; } >&2
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(MANS)
+installdirs: installdirs-recursive
+installdirs-am:
+	for dir in "$(DESTDIR)$(man1dir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-hdr distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-man
+
+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-man1
+
+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: uninstall-man
+
+uninstall-man: uninstall-man1
+
+.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-lzma dist-shar dist-tarZ dist-xz dist-zip distcheck \
+	distclean distclean-generic distclean-hdr distclean-tags \
+	distcleancheck distdir distuninstallcheck dvi dvi-am html \
+	html-am info info-am install install-am install-data \
+	install-data-am install-dvi install-dvi-am install-exec \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-man install-man1 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 uninstall-man uninstall-man1
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..e69de29
diff --git a/README b/README
index 09ed5ea..46e7768 100644
--- a/README
+++ b/README
@@ -1,67 +1,11 @@
-*-----------------------------------------------------------------------------*
-* $Id: README,v 2.4 2003/11/19 11:56:10 vflegel Exp $
-*-----------------------------------------------------------------------------*
-*
-* README - Description of 'pftools' release 2.3 package and files.
-*          Package install instructions.
-*
-* Author:
-*    Philipp Bucher
-*
-* Maintainer:
-*    Volker Flegel
-*
-*-----------------------------------------------------------------------------*
-*
-* Contact and bug reports:
-*    pftools at isb-sib.ch
-*
-*-----------------------------------------------------------------------------*
-*
-* Copyright:
-*    (c) 2003 Swiss Institute of Bioinformatics
-*
-*-----------------------------------------------------------------------------*
-*-----------------------------------------------------------------------------*
-
-Contents:
-
- - Package description
-   . Profile format
-   . Programs and manual pages
-   . Compilation issues
-
- - Installation
-   . Compiling
-   . Installing
-
- - File list
-
- - Testing
-
- - Contact
-
-*-----------------------------------------------------------------------------*
-
-Package description:
--------------------
-The 'pftools' package is a collection of experimental programs supporting the
+"pftools" is a collection of experimental programs supporting the
 generalized profile format and search method of PROSITE.
-A description of the generalized profile format is given in the file:
+A description of the generalized profile format is given in file:
 
    profile.txt
 
-The official web site for the 'pftools' package can be found under:
-
-   http://www.isrec.isb-sib.ch/pftools
-
-Further information on PROSITE specific applications of the 'pftools' programs
-can be found at the following URL:
-
-   http://www.expasy.org/prosite/
-
-Release 2.3 contains FORTRAN 77 source code and manual pages for the following
-programs:
+Version 2.2 contains FORTRAN 77 source code and manual pages for
+the following programs:
 
    pfsearch
    pfscan
@@ -76,69 +20,34 @@ programs:
    6ft
    2ft
 
-Some supplementary manual pages describing the 'psa' and 'xpsa' file formats
-have also been included.
-
-These programs have successfully been compiled and tested under Solaris,
-IRIX64, HP-UX, Tru64 and Linux operating systems, using the GNU g77 or f77
-compilers. 
+These programs have successfully been compiled and tested under
+Solaris, IRIX64, HP-UX, and Linux operating systems, using
+the GNU g77 compiler. 
 
-For compilation with native f77 compilers, the Makefile needs to be modified
-according to instructions given therein.  
+For compilation with native f77 compilers, the Makefile needs
+to be modified according to instructions given therein.  
 
-For use under HP-UX, the file 'sterr.f' should also be modified according to
-instructions given therein. 
+For use under HP-UX, the file sterr.f should also be modified
+according to instructions given therein. 
 
-The buffer sizes in release 2.3 of the 'pftools' have been significantly
-increased to handle large sequences and profiles. Therefore it might be 
-necessary to reduce the buffer sizes in order to run the programs on machines
-with less RAM. This can be achieved by modifying the file 'ardim.f' according
-to instructions given therein. 
+To run the programs on machines with less than 32 MB RAM, modify 
+the file ardim.f according to instructions given therein. 
 
 The "Integer*2" declarations may cause problems with early versions
 of the g77 compiler; solution: replace "Integer*2" by "Integer". 
 
-*-----------------------------------------------------------------------------*
+In order to compile the programs, type:
 
-Installation:
-------------
-The compressed 'tar' archive can be extracted to the current directory using
-the following command:
+   make
 
-   tar -xzvf pftools_23.tar.gz
-
-This will create a directory containing the source and package files.
-
-In order to compile the programs on Unix like systems with a FORTRAN 77
-compiler, change into the source directory and simply type:
-
-   make all
-
-This will create the 12 binaries listed above. To install the binaries and the
-corresponding manual pages, an installation script has been provided. It can
-be invoked using:
+This will create the nine binaries listed above. To install the 
+the binaries and the corresponding manual pages, first define
+the target directories in the Makefile, then type:
 
    make install
 
-The installation script will ask the user the destination directory for the
-'pftools' package. This directory will contain all the supplementary files,
-as well as a 'bin' directory for the executable programs. The installer will
-then create symbolic links to the binary programs in a directory specified by
-the user. This directory should be included in the users 'PATH' variable for
-him to be able to execute the 'pftools' programs.
-In a last step, the installer will link the man pages in the system wide man
-page location, this location can also be specified by the user.
-After successful installation, the build directory can safely be deleted.
-
-Note that you should have write permissions on the destination directories
-specified during installation. For system wide installation you may need root
-privileges, if necessary contact your system administrator.
-
-
-*-----------------------------------------------------------------------------*
-
-File list:
----------
+*-----
+ 
 Further included in this release are the following demo data files:
 
    CVPBR322
@@ -176,17 +85,17 @@ plus the following additional substution matrices in old GCG format:
    pam250.cmp
    pam400.cmp
 
-*-----------------------------------------------------------------------------*
+a test script: 
+
+   test.sh 
+
+and a test ouput file: 
+
+   test.out
 
-Testing:
--------
-A test script is provided. It will simply execute all the 'pftools' binaries
-with some example files. The test script 'test.sh' should be executed in
-the same directory as the binaries and the demo files. An example test
-output file 'test.out' is provided as a reference.
 To test the programs, type: 
 
-   ./test.sh > out 
+   sh  test.sh > out 
    diff test.out out 
 
 Some rounding or formatting variation may occur with real number
@@ -196,24 +105,15 @@ differences in the result of test 7.
 Note that the file pfam_sh3.hmm contains a hidden Markov model from the
 PFAM A collection release 4.0 (see http://www.sanger.ac.uk/Pfam).
 
+*-----
 
-*-----------------------------------------------------------------------------*
-
-Contact:
--------
-Please send bug reports to:
+Total number of files included in this directory: 101
 
-   pftools at isb-sib.ch
+*-----
 
-The pftools package was originaly developped by Philipp Bucher and is
-currently maintained by Volker Flegel at the:
-
-Swiss Institute of Bioinformatics (Epalinges office)
-chemin des Boveresses 155
-1066 Epalinges
-Switzerland 
+Please send bug reports to:
 
-http://www.isb-sib.ch
+   Philipp Bucher
+   E-mail: Philipp.Bucher at isrec.unil.ch
 
-*-----------------------------------------------------------------------------*
-*-----------------------------------------------------------------------------*
+Philipp Bucher, July 1999
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644
index 0000000..af3a52b
--- /dev/null
+++ b/aclocal.m4
@@ -0,0 +1,1454 @@
+# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2007, 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.
+
+# 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'.])])
+
+# ===========================================================================
+#   http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS])
+#
+# DESCRIPTION
+#
+#   Check whether the given FLAG works with the current language's compiler
+#   or gives an error.  (Warnings, however, are ignored)
+#
+#   ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
+#   success/failure.
+#
+#   If EXTRA-FLAGS is defined, it is added to the current language's default
+#   flags (e.g. CFLAGS) when the check is done.  The check is thus made with
+#   the flags: "CFLAGS EXTRA-FLAGS FLAG".  This can for example be used to
+#   force the compiler to issue an error when a bad flag is given.
+#
+#   NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
+#   macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Guido U. Draheim <guidod at gmx.de>
+#   Copyright (c) 2011 Maarten Bosmans <mkbosmans at gmail.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 3 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, see <http://www.gnu.org/licenses/>.
+#
+#   As a special exception, the respective Autoconf Macro's copyright owner
+#   gives unlimited permission to copy, distribute and modify the configure
+#   scripts that are the output of Autoconf when processing the Macro. You
+#   need not follow the terms of the GNU General Public License when using
+#   or distributing such scripts, even though portions of the text of the
+#   Macro appear in them. The GNU General Public License (GPL) does govern
+#   all other use of the material that constitutes the Autoconf Macro.
+#
+#   This special exception to the GPL applies to versions of the Autoconf
+#   Macro released by the Autoconf Archive. When you make and distribute a
+#   modified version of the Autoconf Macro, you may extend this special
+#   exception to the GPL to apply to your modified version as well.
+
+#serial 2
+
+AC_DEFUN([AX_CHECK_COMPILE_FLAG],
+[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX
+AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
+AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
+  ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
+  _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
+  AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
+    [AS_VAR_SET(CACHEVAR,[yes])],
+    [AS_VAR_SET(CACHEVAR,[no])])
+  _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
+AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes],
+  [m4_default([$2], :)],
+  [m4_default([$3], :)])
+AS_VAR_POPDEF([CACHEVAR])dnl
+])dnl AX_CHECK_COMPILE_FLAGS
+
+# ===========================================================================
+#    http://www.gnu.org/software/autoconf-archive/ax_compiler_vendor.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_COMPILER_VENDOR
+#
+# DESCRIPTION
+#
+#   Determine the vendor of the C/C++ compiler, e.g., gnu, intel, ibm, sun,
+#   hp, borland, comeau, dec, cray, kai, lcc, metrowerks, sgi, microsoft,
+#   watcom, etc. The vendor is returned in the cache variable
+#   $ax_cv_c_compiler_vendor for C and $ax_cv_cxx_compiler_vendor for C++.
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Steven G. Johnson <stevenj at alum.mit.edu>
+#   Copyright (c) 2008 Matteo Frigo
+#
+#   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 3 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, see <http://www.gnu.org/licenses/>.
+#
+#   As a special exception, the respective Autoconf Macro's copyright owner
+#   gives unlimited permission to copy, distribute and modify the configure
+#   scripts that are the output of Autoconf when processing the Macro. You
+#   need not follow the terms of the GNU General Public License when using
+#   or distributing such scripts, even though portions of the text of the
+#   Macro appear in them. The GNU General Public License (GPL) does govern
+#   all other use of the material that constitutes the Autoconf Macro.
+#
+#   This special exception to the GPL applies to versions of the Autoconf
+#   Macro released by the Autoconf Archive. When you make and distribute a
+#   modified version of the Autoconf Macro, you may extend this special
+#   exception to the GPL to apply to your modified version as well.
+
+#serial 11
+
+AC_DEFUN([AX_COMPILER_VENDOR],
+[AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor,
+  [# note: don't check for gcc first since some other compilers define __GNUC__
+  vendors="intel:     __ICC,__ECC,__INTEL_COMPILER
+           ibm:       __xlc__,__xlC__,__IBMC__,__IBMCPP__
+           pathscale: __PATHCC__,__PATHSCALE__
+           clang:     __clang__
+           gnu:       __GNUC__
+           sun:       __SUNPRO_C,__SUNPRO_CC
+           hp:        __HP_cc,__HP_aCC
+           dec:       __DECC,__DECCXX,__DECC_VER,__DECCXX_VER
+           borland:   __BORLANDC__,__TURBOC__
+           comeau:    __COMO__
+           cray:      _CRAYC
+           kai:       __KCC
+           lcc:       __LCC__
+           sgi:       __sgi,sgi
+           microsoft: _MSC_VER
+           metrowerks: __MWERKS__
+           watcom:    __WATCOMC__
+           portland:  __PGI
+           unknown:   UNKNOWN"
+  for ventest in $vendors; do
+    case $ventest in
+      *:) vendor=$ventest; continue ;;
+      *)  vencpp="defined("`echo $ventest | sed 's/,/) || defined(/g'`")" ;;
+    esac
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[
+      #if !($vencpp)
+        thisisanerror;
+      #endif
+    ])], [break])
+  done
+  ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor=`echo $vendor | cut -d: -f1`
+ ])
+])
+
+# ===========================================================================
+#        http://www.gnu.org/software/autoconf-archive/ax_pthread.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
+#
+# DESCRIPTION
+#
+#   This macro figures out how to build C programs using POSIX threads. It
+#   sets the PTHREAD_LIBS output variable to the threads library and linker
+#   flags, and the PTHREAD_CFLAGS output variable to any special C compiler
+#   flags that are needed. (The user can also force certain compiler
+#   flags/libs to be tested by setting these environment variables.)
+#
+#   Also sets PTHREAD_CC to any special C compiler that is needed for
+#   multi-threaded programs (defaults to the value of CC otherwise). (This
+#   is necessary on AIX to use the special cc_r compiler alias.)
+#
+#   NOTE: You are assumed to not only compile your program with these flags,
+#   but also link it with them as well. e.g. you should link with
+#   $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
+#
+#   If you are only building threads programs, you may wish to use these
+#   variables in your default LIBS, CFLAGS, and CC:
+#
+#     LIBS="$PTHREAD_LIBS $LIBS"
+#     CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+#     CC="$PTHREAD_CC"
+#
+#   In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
+#   has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name
+#   (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
+#
+#   Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the
+#   PTHREAD_PRIO_INHERIT symbol is defined when compiling with
+#   PTHREAD_CFLAGS.
+#
+#   ACTION-IF-FOUND is a list of shell commands to run if a threads library
+#   is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
+#   is not found. If ACTION-IF-FOUND is not specified, the default action
+#   will define HAVE_PTHREAD.
+#
+#   Please let the authors know if this macro fails on any platform, or if
+#   you have any other suggestions or comments. This macro was based on work
+#   by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help
+#   from M. Frigo), as well as ac_pthread and hb_pthread macros posted by
+#   Alejandro Forero Cuervo to the autoconf macro repository. We are also
+#   grateful for the helpful feedback of numerous users.
+#
+#   Updated for Autoconf 2.68 by Daniel Richard G.
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Steven G. Johnson <stevenj at alum.mit.edu>
+#   Copyright (c) 2011 Daniel Richard G. <skunk at iSKUNK.ORG>
+#
+#   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 3 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, see <http://www.gnu.org/licenses/>.
+#
+#   As a special exception, the respective Autoconf Macro's copyright owner
+#   gives unlimited permission to copy, distribute and modify the configure
+#   scripts that are the output of Autoconf when processing the Macro. You
+#   need not follow the terms of the GNU General Public License when using
+#   or distributing such scripts, even though portions of the text of the
+#   Macro appear in them. The GNU General Public License (GPL) does govern
+#   all other use of the material that constitutes the Autoconf Macro.
+#
+#   This special exception to the GPL applies to versions of the Autoconf
+#   Macro released by the Autoconf Archive. When you make and distribute a
+#   modified version of the Autoconf Macro, you may extend this special
+#   exception to the GPL to apply to your modified version as well.
+
+#serial 18
+
+AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
+AC_DEFUN([AX_PTHREAD], [
+AC_REQUIRE([AC_CANONICAL_HOST])
+AC_LANG_PUSH([C])
+ax_pthread_ok=no
+
+# We used to check for pthread.h first, but this fails if pthread.h
+# requires special compiler flags (e.g. on True64 or Sequent).
+# It gets checked for in the link test anyway.
+
+# First of all, check if the user has set any of the PTHREAD_LIBS,
+# etcetera environment variables, and if threads linking works using
+# them:
+if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
+        save_CFLAGS="$CFLAGS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+        save_LIBS="$LIBS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
+        AC_TRY_LINK_FUNC(pthread_join, ax_pthread_ok=yes)
+        AC_MSG_RESULT($ax_pthread_ok)
+        if test x"$ax_pthread_ok" = xno; then
+                PTHREAD_LIBS=""
+                PTHREAD_CFLAGS=""
+        fi
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+fi
+
+# We must check for the threads library under a number of different
+# names; the ordering is very important because some systems
+# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
+# libraries is broken (non-POSIX).
+
+# Create a list of thread flags to try.  Items starting with a "-" are
+# C compiler flags, and other items are library names, except for "none"
+# which indicates that we try without any flags at all, and "pthread-config"
+# which is a program returning the flags for the Pth emulation library.
+
+ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
+
+# The ordering *is* (sometimes) important.  Some notes on the
+# individual items follow:
+
+# pthreads: AIX (must check this before -lpthread)
+# none: in case threads are in libc; should be tried before -Kthread and
+#       other compiler flags to prevent continual compiler warnings
+# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
+# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
+# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
+# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
+# -pthreads: Solaris/gcc
+# -mthreads: Mingw32/gcc, Lynx/gcc
+# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
+#      doesn't hurt to check since this sometimes defines pthreads too;
+#      also defines -D_REENTRANT)
+#      ... -mt is also the pthreads flag for HP/aCC
+# pthread: Linux, etcetera
+# --thread-safe: KAI C++
+# pthread-config: use pthread-config program (for GNU Pth library)
+
+case ${host_os} in
+        solaris*)
+
+        # On Solaris (at least, for some versions), libc contains stubbed
+        # (non-functional) versions of the pthreads routines, so link-based
+        # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
+        # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
+        # a function called by this macro, so we could check for that, but
+        # who knows whether they'll stub that too in a future libc.)  So,
+        # we'll just look for -pthreads and -lpthread first:
+
+        ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
+        ;;
+
+        darwin*)
+        ax_pthread_flags="-pthread $ax_pthread_flags"
+        ;;
+esac
+
+if test x"$ax_pthread_ok" = xno; then
+for flag in $ax_pthread_flags; do
+
+        case $flag in
+                none)
+                AC_MSG_CHECKING([whether pthreads work without any flags])
+                ;;
+
+                -*)
+                AC_MSG_CHECKING([whether pthreads work with $flag])
+                PTHREAD_CFLAGS="$flag"
+                ;;
+
+                pthread-config)
+                AC_CHECK_PROG(ax_pthread_config, pthread-config, yes, no)
+                if test x"$ax_pthread_config" = xno; then continue; fi
+                PTHREAD_CFLAGS="`pthread-config --cflags`"
+                PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
+                ;;
+
+                *)
+                AC_MSG_CHECKING([for the pthreads library -l$flag])
+                PTHREAD_LIBS="-l$flag"
+                ;;
+        esac
+
+        save_LIBS="$LIBS"
+        save_CFLAGS="$CFLAGS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+        # Check for various functions.  We must include pthread.h,
+        # since some functions may be macros.  (On the Sequent, we
+        # need a special flag -Kthread to make this header compile.)
+        # We check for pthread_join because it is in -lpthread on IRIX
+        # while pthread_create is in libc.  We check for pthread_attr_init
+        # due to DEC craziness with -lpthreads.  We check for
+        # pthread_cleanup_push because it is one of the few pthread
+        # functions on Solaris that doesn't have a non-functional libc stub.
+        # We try pthread_create on general principles.
+        AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>
+                        static void routine(void *a) { a = 0; }
+                        static void *start_routine(void *a) { return a; }],
+                       [pthread_t th; pthread_attr_t attr;
+                        pthread_create(&th, 0, start_routine, 0);
+                        pthread_join(th, 0);
+                        pthread_attr_init(&attr);
+                        pthread_cleanup_push(routine, 0);
+                        pthread_cleanup_pop(0) /* ; */])],
+                [ax_pthread_ok=yes],
+                [])
+
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+
+        AC_MSG_RESULT($ax_pthread_ok)
+        if test "x$ax_pthread_ok" = xyes; then
+                break;
+        fi
+
+        PTHREAD_LIBS=""
+        PTHREAD_CFLAGS=""
+done
+fi
+
+# Various other checks:
+if test "x$ax_pthread_ok" = xyes; then
+        save_LIBS="$LIBS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        save_CFLAGS="$CFLAGS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+        # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
+        AC_MSG_CHECKING([for joinable pthread attribute])
+        attr_name=unknown
+        for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
+            AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>],
+                           [int attr = $attr; return attr /* ; */])],
+                [attr_name=$attr; break],
+                [])
+        done
+        AC_MSG_RESULT($attr_name)
+        if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
+            AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name,
+                               [Define to necessary symbol if this constant
+                                uses a non-standard name on your system.])
+        fi
+
+        AC_MSG_CHECKING([if more special flags are required for pthreads])
+        flag=no
+        case ${host_os} in
+            aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
+            osf* | hpux*) flag="-D_REENTRANT";;
+            solaris*)
+            if test "$GCC" = "yes"; then
+                flag="-D_REENTRANT"
+            else
+                flag="-mt -D_REENTRANT"
+            fi
+            ;;
+        esac
+        AC_MSG_RESULT(${flag})
+        if test "x$flag" != xno; then
+            PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
+        fi
+
+        AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT],
+            ax_cv_PTHREAD_PRIO_INHERIT, [
+                AC_LINK_IFELSE([
+                    AC_LANG_PROGRAM([[#include <pthread.h>]], [[int i = PTHREAD_PRIO_INHERIT;]])],
+                    [ax_cv_PTHREAD_PRIO_INHERIT=yes],
+                    [ax_cv_PTHREAD_PRIO_INHERIT=no])
+            ])
+        AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"],
+            AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], 1, [Have PTHREAD_PRIO_INHERIT.]))
+
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+
+        # More AIX lossage: must compile with xlc_r or cc_r
+        if test x"$GCC" != xyes; then
+          AC_CHECK_PROGS(PTHREAD_CC, xlc_r cc_r, ${CC})
+        else
+          PTHREAD_CC=$CC
+        fi
+else
+        PTHREAD_CC="$CC"
+fi
+
+AC_SUBST(PTHREAD_LIBS)
+AC_SUBST(PTHREAD_CFLAGS)
+AC_SUBST(PTHREAD_CC)
+
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+if test x"$ax_pthread_ok" = xyes; then
+        ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
+        :
+else
+        ax_pthread_ok=no
+        $2
+fi
+AC_LANG_POP
+])dnl AX_PTHREAD
+
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 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.
+
+# 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.1], [],
+      [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.1])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  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.
+
+# 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
+# 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 10
+
+# 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'.
+  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
+      ;;
+    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='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])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  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.
+
+# 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
+])
+
+# Copyright (C) 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_PROG_CC_C_O
+# --------------
+# Like AC_PROG_CC_C_O, but changed for automake.
+AC_DEFUN([AM_PROG_CC_C_O],
+[AC_REQUIRE([AC_PROG_CC_C_O])dnl
+AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([compile])dnl
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
+eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
+if test "$am_t" != yes; then
+   # Losing compiler, so override with the script.
+   # FIXME: It is wrong to rewrite CC.
+   # But if we don't then we get into trouble of one sort or another.
+   # A longer-term fix would be to have automake use am__CC in this case,
+   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+   CC="$am_aux_dir/compile $CC"
+fi
+dnl Make sure AC_PROG_CC is never called again, or it will override our
+dnl setting of CC.
+m4_define([AC_PROG_CC],
+          [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
+])
+
+# 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  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.
+
+# 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  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_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  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.
+
+# 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  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_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  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.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} 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
+
diff --git a/compile b/compile
new file mode 100755
index 0000000..c0096a7
--- /dev/null
+++ b/compile
@@ -0,0 +1,143 @@
+#! /bin/sh
+# Wrapper for compilers which do not understand `-c -o'.
+
+scriptversion=2009-10-06.20; # UTC
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009  Free Software
+# Foundation, Inc.
+# Written by Tom Tromey <tromey at cygnus.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, 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, see <http://www.gnu.org/licenses/>.
+
+# 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.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake at gnu.org> or send patches to
+# <automake-patches at gnu.org>.
+
+case $1 in
+  '')
+     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: compile [--help] [--version] PROGRAM [ARGS]
+
+Wrapper for compilers which do not understand `-c -o'.
+Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
+arguments, and rename the output as expected.
+
+If you are trying to build a whole package this is not the
+right script to run: please start by reading the file `INSTALL'.
+
+Report bugs to <bug-automake at gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "compile $scriptversion"
+    exit $?
+    ;;
+esac
+
+ofile=
+cfile=
+eat=
+
+for arg
+do
+  if test -n "$eat"; then
+    eat=
+  else
+    case $1 in
+      -o)
+	# configure might choose to run compile as `compile cc -o foo foo.c'.
+	# So we strip `-o arg' only if arg is an object.
+	eat=1
+	case $2 in
+	  *.o | *.obj)
+	    ofile=$2
+	    ;;
+	  *)
+	    set x "$@" -o "$2"
+	    shift
+	    ;;
+	esac
+	;;
+      *.c)
+	cfile=$1
+	set x "$@" "$1"
+	shift
+	;;
+      *)
+	set x "$@" "$1"
+	shift
+	;;
+    esac
+  fi
+  shift
+done
+
+if test -z "$ofile" || test -z "$cfile"; then
+  # If no `-o' option was seen then we might have been invoked from a
+  # pattern rule where we don't need one.  That is ok -- this is a
+  # normal compilation that the losing compiler can handle.  If no
+  # `.c' file was seen then we are probably linking.  That is also
+  # ok.
+  exec "$@"
+fi
+
+# Name of file we expect compiler to create.
+cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
+
+# Create the lock directory.
+# Note: use `[/\\:.-]' here to ensure that we don't use the same name
+# that we are using for the .o file.  Also, base the name on the expected
+# object file name, since that is what matters with a parallel build.
+lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
+while true; do
+  if mkdir "$lockdir" >/dev/null 2>&1; then
+    break
+  fi
+  sleep 1
+done
+# FIXME: race condition here if user kills between mkdir and trap.
+trap "rmdir '$lockdir'; exit 1" 1 2 15
+
+# Run the compile.
+"$@"
+ret=$?
+
+if test -f "$cofile"; then
+  test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
+elif test -f "${cofile}bj"; then
+  test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
+fi
+
+rmdir "$lockdir"
+exit $ret
+
+# 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-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/config.guess b/config.guess
new file mode 100755
index 0000000..a3b0d66
--- /dev/null
+++ b/config.guess
@@ -0,0 +1,1545 @@
+#! /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, 2009, 2010,
+#   2011, 2012 Free Software Foundation, Inc.
+
+timestamp='2012-02-10'
+
+# 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, see <http://www.gnu.org/licenses/>.
+#
+# 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.  Please send patches (context
+# diff format) to <config-patches at gnu.org> and include a 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.
+#
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+
+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, 2009, 2010, 2011, 2012
+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
+
+case "${UNAME_SYSTEM}" in
+Linux|GNU/*)
+	eval $set_cc_for_build
+	cat <<-EOF > $dummy.c
+	#include <features.h>
+	#ifdef __UCLIBC__
+	# ifdef __UCLIBC_CONFIG_VERSION__
+	LIBC=uclibc __UCLIBC_CONFIG_VERSION__
+	# else
+	LIBC=uclibc
+	# endif
+	#else
+	# ifdef __dietlibc__
+	LIBC=dietlibc
+	# else
+	LIBC=gnu
+	# endif
+	#endif
+	EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+	;;
+esac
+
+# 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 tuples: *-*-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 -q __ELF__
+		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'`
+	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+	exitcode=$?
+	trap '' 0
+	exit $exitcode ;;
+    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 ;;
+    s390x:SunOS:*:*)
+	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    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:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+	echo i386-pc-auroraux${UNAME_RELEASE}
+	exit ;;
+    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+	eval $set_cc_for_build
+	SUN_ARCH="i386"
+	# If there is a compiler, see if it is configured for 64-bit objects.
+	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+	# This test works for both compilers.
+	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+		grep IS_64BIT_ARCH >/dev/null
+	    then
+		SUN_ARCH="x86_64"
+	    fi
+	fi
+	echo ${SUN_ARCH}-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:*:[4567])
+	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 -q __LP64__
+	    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:*:*)
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
+	case ${UNAME_PROCESSOR} in
+	    amd64)
+		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	    *)
+		echo ${UNAME_PROCESSOR}-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*:MSYS*:*)
+	echo ${UNAME_MACHINE}-pc-msys
+	exit ;;
+    i*:windows32*:*)
+	# uname -m includes "-pc" on this system.
+	echo ${UNAME_MACHINE}-mingw32
+	exit ;;
+    i*:PW*:*)
+	echo ${UNAME_MACHINE}-pc-pw32
+	exit ;;
+    *:Interix*:*)
+	case ${UNAME_MACHINE} in
+	    x86)
+		echo i586-pc-interix${UNAME_RELEASE}
+		exit ;;
+	    authenticamd | genuineintel | EM64T)
+		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 ;;
+    8664:Windows_NT:*)
+	echo x86_64-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-${LIBC}`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/[-(].*//'`-${LIBC}
+	exit ;;
+    i*86:Minix:*:*)
+	echo ${UNAME_MACHINE}-pc-minix
+	exit ;;
+    aarch64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    aarch64_be:Linux:*:*)
+	UNAME_MACHINE=aarch64_be
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	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 -q ld.so.1
+	if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	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-${LIBC}
+	else
+	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+		| grep -q __ARM_PCS_VFP
+	    then
+		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
+	    else
+		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
+	    fi
+	fi
+	exit ;;
+    avr32*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    cris:Linux:*:*)
+	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+	exit ;;
+    crisv32:Linux:*:*)
+	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+	exit ;;
+    frv:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    hexagon:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    i*86:Linux:*:*)
+	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+	exit ;;
+    ia64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    m32r*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    m68*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    mips:Linux:*:* | mips64:Linux:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#undef CPU
+	#undef ${UNAME_MACHINE}
+	#undef ${UNAME_MACHINE}el
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	CPU=${UNAME_MACHINE}el
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	CPU=${UNAME_MACHINE}
+	#else
+	CPU=
+	#endif
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
+	;;
+    or32:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    padre:Linux:*:*)
+	echo sparc-unknown-linux-${LIBC}
+	exit ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+	echo hppa64-unknown-linux-${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-${LIBC} ;;
+	  PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+	  *)    echo hppa-unknown-linux-${LIBC} ;;
+	esac
+	exit ;;
+    ppc64:Linux:*:*)
+	echo powerpc64-unknown-linux-${LIBC}
+	exit ;;
+    ppc:Linux:*:*)
+	echo powerpc-unknown-linux-${LIBC}
+	exit ;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+	echo ${UNAME_MACHINE}-ibm-linux
+	exit ;;
+    sh64*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    sh*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    tile*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    vax:Linux:*:*)
+	echo ${UNAME_MACHINE}-dec-linux-${LIBC}
+	exit ;;
+    x86_64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    xtensa*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	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.[02]*:*)
+	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 i586.
+	# Note: whatever this is, it MUST be the same as what config.sub
+	# prints for the "djgpp" host, or else GDB configury will decide that
+	# this is a cross-build.
+	echo i586-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; } ;;
+    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+	OS_REL='.3'
+	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; }
+	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+	    && { echo i586-ncr-sysv4.3${OS_REL}; 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.[02]*:*)
+	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 ;;
+    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
+	echo i586-pc-haiku
+	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
+	    i386)
+		eval $set_cc_for_build
+		if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+		  if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+		      (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+		      grep IS_64BIT_ARCH >/dev/null
+		  then
+		      UNAME_PROCESSOR="x86_64"
+		  fi
+		fi ;;
+	    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 ;;
+    NEO-?:NONSTOP_KERNEL:*:*)
+	echo neo-tandem-nsk${UNAME_RELEASE}
+	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 ;;
+    i*86:AROS:*:*)
+	echo ${UNAME_MACHINE}-pc-aros
+	exit ;;
+    x86_64:VMkernel:*:*)
+	echo ${UNAME_MACHINE}-unknown-esx
+	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/config.log b/config.log
new file mode 100644
index 0000000..8a21fae
--- /dev/null
+++ b/config.log
@@ -0,0 +1,2144 @@
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by PfTools configure 3.0, which was
+generated by GNU Autoconf 2.68.  Invocation command line was
+
+  $ ./configure --enable-mmap --enable-thread-affinity CFLAGS=-mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse FFLAGS=-mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse --no-create --no-recursion
+
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = sib-pc42
+uname -m = x86_64
+uname -r = 3.2.0-4-amd64
+uname -s = Linux
+uname -v = #1 SMP Debian 3.2.35-2
+
+/usr/bin/uname -p = unknown
+/bin/uname -X     = unknown
+
+/bin/arch              = unknown
+/usr/bin/arch -k       = unknown
+/usr/convex/getsysinfo = unknown
+/usr/bin/hostinfo      = unknown
+/bin/machine           = unknown
+/usr/bin/oslevel       = unknown
+/bin/universe          = unknown
+
+PATH: /opt/bin
+PATH: /home/lcerutti/usr/bin
+PATH: /opt/bin
+PATH: /home/lcerutti/usr/bin
+PATH: /usr/X11R6/bin
+PATH: /usr/local/bin
+PATH: /usr/bin
+PATH: /bin
+PATH: /usr/local/games
+PATH: /usr/games
+PATH: /home/lcerutti/bin
+PATH: /usr/local/molbio/bin
+PATH: /usr/local/bin
+PATH: /usr/molbio/bin
+PATH: /usr/molbio/perl
+PATH: /usr/local/bin
+PATH: /usr/molbio/bin
+PATH: /usr/molbio/perl
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+configure:2257: Configuring PfTools for your system.
+configure:2292: checking build system type
+configure:2306: result: x86_64-unknown-linux-gnu
+configure:2326: checking host system type
+configure:2339: result: x86_64-unknown-linux-gnu
+configure:2359: checking target system type
+configure:2372: result: x86_64-unknown-linux-gnu
+configure:2418: checking for a BSD-compatible install
+configure:2486: result: /usr/bin/install -c
+configure:2497: checking whether build environment is sane
+configure:2547: result: yes
+configure:2688: checking for a thread-safe mkdir -p
+configure:2727: result: /bin/mkdir -p
+configure:2740: checking for gawk
+configure:2770: result: no
+configure:2740: checking for mawk
+configure:2756: found /usr/bin/mawk
+configure:2767: result: mawk
+configure:2778: checking whether make sets $(MAKE)
+configure:2800: result: yes
+configure:2943: checking for g77
+configure:2973: result: no
+configure:2943: checking for xlf
+configure:2973: result: no
+configure:2943: checking for f77
+configure:2973: result: no
+configure:2943: checking for frt
+configure:2973: result: no
+configure:2943: checking for pgf77
+configure:2973: result: no
+configure:2943: checking for cf77
+configure:2973: result: no
+configure:2943: checking for fort77
+configure:2973: result: no
+configure:2943: checking for fl32
+configure:2973: result: no
+configure:2943: checking for af77
+configure:2973: result: no
+configure:2943: checking for xlf90
+configure:2973: result: no
+configure:2943: checking for f90
+configure:2973: result: no
+configure:2943: checking for pgf90
+configure:2973: result: no
+configure:2943: checking for pghpf
+configure:2973: result: no
+configure:2943: checking for epcf90
+configure:2973: result: no
+configure:2943: checking for gfortran
+configure:2959: found /usr/bin/gfortran
+configure:2970: result: gfortran
+configure:2996: checking for Fortran 77 compiler version
+configure:3005: gfortran --version >&5
+GNU Fortran (Debian 4.7.2-5) 4.7.2
+Copyright (C) 2012 Free Software Foundation, Inc.
+
+GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
+You may redistribute copies of GNU Fortran
+under the terms of the GNU General Public License.
+For more information about these matters, see the file named COPYING
+
+configure:3016: $? = 0
+configure:3005: gfortran -v >&5
+Using built-in specs.
+COLLECT_GCC=gfortran
+COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.7/lto-wrapper
+Target: x86_64-linux-gnu
+Configured with: ../src/configure -v --with-pkgversion='Debian 4.7.2-5' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.7 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable- [...]
+Thread model: posix
+gcc version 4.7.2 (Debian 4.7.2-5) 
+configure:3016: $? = 0
+configure:3005: gfortran -V >&5
+gfortran: error: unrecognized command line option '-V'
+gfortran: fatal error: no input files
+compilation terminated.
+configure:3016: $? = 4
+configure:3005: gfortran -qversion >&5
+gfortran: error: unrecognized command line option '-qversion'
+gfortran: fatal error: no input files
+compilation terminated.
+configure:3016: $? = 4
+configure:3031: checking whether the Fortran 77 compiler works
+configure:3053: gfortran -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse  conftest.f  >&5
+configure:3057: $? = 0
+configure:3105: result: yes
+configure:3108: checking for Fortran 77 compiler default output file name
+configure:3110: result: a.out
+configure:3116: checking for suffix of executables
+configure:3123: gfortran -o conftest -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse  conftest.f  >&5
+configure:3127: $? = 0
+configure:3149: result: 
+configure:3165: checking whether we are cross compiling
+configure:3173: gfortran -o conftest -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse  conftest.f  >&5
+configure:3177: $? = 0
+configure:3184: ./conftest
+configure:3188: $? = 0
+configure:3203: result: no
+configure:3208: checking for suffix of object files
+configure:3224: gfortran -c -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse conftest.f >&5
+configure:3228: $? = 0
+configure:3249: result: o
+configure:3257: checking whether we are using the GNU Fortran 77 compiler
+configure:3270: gfortran -c -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse conftest.F >&5
+configure:3270: $? = 0
+configure:3279: result: yes
+configure:3285: checking whether gfortran accepts -g
+configure:3296: gfortran -c -g conftest.f >&5
+configure:3296: $? = 0
+configure:3304: result: yes
+configure:3381: checking for gcc
+configure:3397: found /usr/bin/gcc
+configure:3408: result: gcc
+configure:3637: checking for C compiler version
+configure:3646: gcc --version >&5
+gcc (Debian 4.7.2-5) 4.7.2
+Copyright (C) 2012 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.
+
+configure:3657: $? = 0
+configure:3646: gcc -v >&5
+Using built-in specs.
+COLLECT_GCC=gcc
+COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.7/lto-wrapper
+Target: x86_64-linux-gnu
+Configured with: ../src/configure -v --with-pkgversion='Debian 4.7.2-5' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.7 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable- [...]
+Thread model: posix
+gcc version 4.7.2 (Debian 4.7.2-5) 
+configure:3657: $? = 0
+configure:3646: gcc -V >&5
+gcc: error: unrecognized command line option '-V'
+gcc: fatal error: no input files
+compilation terminated.
+configure:3657: $? = 4
+configure:3646: gcc -qversion >&5
+gcc: error: unrecognized command line option '-qversion'
+gcc: fatal error: no input files
+compilation terminated.
+configure:3657: $? = 4
+configure:3661: checking whether we are using the GNU C compiler
+configure:3680: gcc -c -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse  conftest.c >&5
+configure:3680: $? = 0
+configure:3689: result: yes
+configure:3698: checking whether gcc accepts -g
+configure:3718: gcc -c -g  conftest.c >&5
+configure:3718: $? = 0
+configure:3759: result: yes
+configure:3776: checking for gcc option to accept ISO C89
+configure:3840: gcc  -c -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse  conftest.c >&5
+configure:3840: $? = 0
+configure:3853: result: none needed
+configure:3884: checking for style of include used by make
+configure:3912: result: GNU
+configure:3937: checking dependency style of gcc
+configure:4047: result: gcc3
+configure:4063: checking whether gcc and cc understand -c and -o together
+configure:4094: gcc -c conftest.c -o conftest2.o >&5
+configure:4098: $? = 0
+configure:4104: gcc -c conftest.c -o conftest2.o >&5
+configure:4108: $? = 0
+configure:4119: cc -c conftest.c >&5
+configure:4123: $? = 0
+configure:4131: cc -c conftest.c -o conftest2.o >&5
+configure:4135: $? = 0
+configure:4141: cc -c conftest.c -o conftest2.o >&5
+configure:4145: $? = 0
+configure:4163: result: yes
+configure:4190: checking for C compiler vendor
+configure:4235: gcc -c -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse  conftest.c >&5
+conftest.c: In function 'main':
+conftest.c:17:9: error: 'thisisanerror' undeclared (first use in this function)
+conftest.c:17:9: note: each undeclared identifier is reported only once for each function it appears in
+configure:4235: $? = 1
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "PfTools"
+| #define PACKAGE_TARNAME "pftools"
+| #define PACKAGE_VERSION "3.0"
+| #define PACKAGE_STRING "PfTools 3.0"
+| #define PACKAGE_BUGREPORT "thierry.schuepbach at isb-sib.ch"
+| #define PACKAGE_URL ""
+| #define PACKAGE "pftools"
+| #define VERSION "3.0"
+| /* end confdefs.h.  */
+| 
+| int
+| main ()
+| {
+| 
+|       #if !(defined(__ICC) || defined(__ECC) || defined(__INTEL_COMPILER))
+|         thisisanerror;
+|       #endif
+| 
+|   ;
+|   return 0;
+| }
+configure:4235: gcc -c -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse  conftest.c >&5
+conftest.c: In function 'main':
+conftest.c:17:9: error: 'thisisanerror' undeclared (first use in this function)
+conftest.c:17:9: note: each undeclared identifier is reported only once for each function it appears in
+configure:4235: $? = 1
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "PfTools"
+| #define PACKAGE_TARNAME "pftools"
+| #define PACKAGE_VERSION "3.0"
+| #define PACKAGE_STRING "PfTools 3.0"
+| #define PACKAGE_BUGREPORT "thierry.schuepbach at isb-sib.ch"
+| #define PACKAGE_URL ""
+| #define PACKAGE "pftools"
+| #define VERSION "3.0"
+| /* end confdefs.h.  */
+| 
+| int
+| main ()
+| {
+| 
+|       #if !(defined(__xlc__) || defined(__xlC__) || defined(__IBMC__) || defined(__IBMCPP__))
+|         thisisanerror;
+|       #endif
+| 
+|   ;
+|   return 0;
+| }
+configure:4235: gcc -c -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse  conftest.c >&5
+conftest.c: In function 'main':
+conftest.c:17:9: error: 'thisisanerror' undeclared (first use in this function)
+conftest.c:17:9: note: each undeclared identifier is reported only once for each function it appears in
+configure:4235: $? = 1
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "PfTools"
+| #define PACKAGE_TARNAME "pftools"
+| #define PACKAGE_VERSION "3.0"
+| #define PACKAGE_STRING "PfTools 3.0"
+| #define PACKAGE_BUGREPORT "thierry.schuepbach at isb-sib.ch"
+| #define PACKAGE_URL ""
+| #define PACKAGE "pftools"
+| #define VERSION "3.0"
+| /* end confdefs.h.  */
+| 
+| int
+| main ()
+| {
+| 
+|       #if !(defined(__PATHCC__) || defined(__PATHSCALE__))
+|         thisisanerror;
+|       #endif
+| 
+|   ;
+|   return 0;
+| }
+configure:4235: gcc -c -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse  conftest.c >&5
+conftest.c: In function 'main':
+conftest.c:17:9: error: 'thisisanerror' undeclared (first use in this function)
+conftest.c:17:9: note: each undeclared identifier is reported only once for each function it appears in
+configure:4235: $? = 1
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "PfTools"
+| #define PACKAGE_TARNAME "pftools"
+| #define PACKAGE_VERSION "3.0"
+| #define PACKAGE_STRING "PfTools 3.0"
+| #define PACKAGE_BUGREPORT "thierry.schuepbach at isb-sib.ch"
+| #define PACKAGE_URL ""
+| #define PACKAGE "pftools"
+| #define VERSION "3.0"
+| /* end confdefs.h.  */
+| 
+| int
+| main ()
+| {
+| 
+|       #if !(defined(__clang__))
+|         thisisanerror;
+|       #endif
+| 
+|   ;
+|   return 0;
+| }
+configure:4235: gcc -c -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse  conftest.c >&5
+configure:4235: $? = 0
+configure:4243: result: gnu
+configure:4690: checking for expf in -lm
+configure:4715: gcc -o conftest -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse   conftest.c -lm   >&5
+conftest.c:18:6: warning: conflicting types for built-in function 'expf' [enabled by default]
+configure:4715: $? = 0
+configure:4724: result: yes
+configure:4739: checking for size_t
+configure:4739: gcc -c -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse  conftest.c >&5
+configure:4739: $? = 0
+configure:4739: gcc -c -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse  conftest.c >&5
+conftest.c: In function 'main':
+conftest.c:48:21: error: expected expression before ')' token
+configure:4739: $? = 1
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "PfTools"
+| #define PACKAGE_TARNAME "pftools"
+| #define PACKAGE_VERSION "3.0"
+| #define PACKAGE_STRING "PfTools 3.0"
+| #define PACKAGE_BUGREPORT "thierry.schuepbach at isb-sib.ch"
+| #define PACKAGE_URL ""
+| #define PACKAGE "pftools"
+| #define VERSION "3.0"
+| #define HAVE_LIBM 1
+| /* end confdefs.h.  */
+| #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
+| int
+| main ()
+| {
+| if (sizeof ((size_t)))
+| 	    return 0;
+|   ;
+|   return 0;
+| }
+configure:4739: result: yes
+configure:4752: checking for working alloca.h
+configure:4769: gcc -o conftest -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse   conftest.c -lm  >&5
+configure:4769: $? = 0
+configure:4777: result: yes
+configure:4785: checking for alloca
+configure:4822: gcc -o conftest -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse   conftest.c -lm  >&5
+configure:4822: $? = 0
+configure:4830: result: yes
+configure:4942: checking fcntl.h usability
+configure:4942: gcc -c -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse  conftest.c >&5
+configure:4942: $? = 0
+configure:4942: result: yes
+configure:4942: checking fcntl.h presence
+configure:4942:   conftest.c
+./configure: line 1542: conftest.c: command not found
+configure:4942: $? = 127
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "PfTools"
+| #define PACKAGE_TARNAME "pftools"
+| #define PACKAGE_VERSION "3.0"
+| #define PACKAGE_STRING "PfTools 3.0"
+| #define PACKAGE_BUGREPORT "thierry.schuepbach at isb-sib.ch"
+| #define PACKAGE_URL ""
+| #define PACKAGE "pftools"
+| #define VERSION "3.0"
+| #define HAVE_LIBM 1
+| #define HAVE_ALLOCA_H 1
+| #define HAVE_ALLOCA 1
+| /* end confdefs.h.  */
+| #include <fcntl.h>
+configure:4942: result: no
+configure:4942: WARNING: fcntl.h: accepted by the compiler, rejected by the preprocessor!
+configure:4942: WARNING: fcntl.h: proceeding with the compiler's result
+configure:4942: checking for fcntl.h
+configure:4942: result: yes
+configure:4942: checking limits.h usability
+configure:4942: gcc -c -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse  conftest.c >&5
+configure:4942: $? = 0
+configure:4942: result: yes
+configure:4942: checking limits.h presence
+configure:4942:   conftest.c
+./configure: line 1542: conftest.c: command not found
+configure:4942: $? = 127
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "PfTools"
+| #define PACKAGE_TARNAME "pftools"
+| #define PACKAGE_VERSION "3.0"
+| #define PACKAGE_STRING "PfTools 3.0"
+| #define PACKAGE_BUGREPORT "thierry.schuepbach at isb-sib.ch"
+| #define PACKAGE_URL ""
+| #define PACKAGE "pftools"
+| #define VERSION "3.0"
+| #define HAVE_LIBM 1
+| #define HAVE_ALLOCA_H 1
+| #define HAVE_ALLOCA 1
+| #define HAVE_FCNTL_H 1
+| /* end confdefs.h.  */
+| #include <limits.h>
+configure:4942: result: no
+configure:4942: WARNING: limits.h: accepted by the compiler, rejected by the preprocessor!
+configure:4942: WARNING: limits.h: proceeding with the compiler's result
+configure:4942: checking for limits.h
+configure:4942: result: yes
+configure:4942: checking stdlib.h usability
+configure:4942: gcc -c -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse  conftest.c >&5
+configure:4942: $? = 0
+configure:4942: result: yes
+configure:4942: checking stdlib.h presence
+configure:4942:   conftest.c
+./configure: line 1542: conftest.c: command not found
+configure:4942: $? = 127
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "PfTools"
+| #define PACKAGE_TARNAME "pftools"
+| #define PACKAGE_VERSION "3.0"
+| #define PACKAGE_STRING "PfTools 3.0"
+| #define PACKAGE_BUGREPORT "thierry.schuepbach at isb-sib.ch"
+| #define PACKAGE_URL ""
+| #define PACKAGE "pftools"
+| #define VERSION "3.0"
+| #define HAVE_LIBM 1
+| #define HAVE_ALLOCA_H 1
+| #define HAVE_ALLOCA 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_LIMITS_H 1
+| /* end confdefs.h.  */
+| #include <stdlib.h>
+configure:4942: result: no
+configure:4942: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!
+configure:4942: WARNING: stdlib.h: proceeding with the compiler's result
+configure:4942: checking for stdlib.h
+configure:4942: result: yes
+configure:4942: checking string.h usability
+configure:4942: gcc -c -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse  conftest.c >&5
+configure:4942: $? = 0
+configure:4942: result: yes
+configure:4942: checking string.h presence
+configure:4942:   conftest.c
+./configure: line 1542: conftest.c: command not found
+configure:4942: $? = 127
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "PfTools"
+| #define PACKAGE_TARNAME "pftools"
+| #define PACKAGE_VERSION "3.0"
+| #define PACKAGE_STRING "PfTools 3.0"
+| #define PACKAGE_BUGREPORT "thierry.schuepbach at isb-sib.ch"
+| #define PACKAGE_URL ""
+| #define PACKAGE "pftools"
+| #define VERSION "3.0"
+| #define HAVE_LIBM 1
+| #define HAVE_ALLOCA_H 1
+| #define HAVE_ALLOCA 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_LIMITS_H 1
+| #define HAVE_STDLIB_H 1
+| /* end confdefs.h.  */
+| #include <string.h>
+configure:4942: result: no
+configure:4942: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!
+configure:4942: WARNING: string.h: proceeding with the compiler's result
+configure:4942: checking for string.h
+configure:4942: result: yes
+configure:4942: checking sys/time.h usability
+configure:4942: gcc -c -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse  conftest.c >&5
+configure:4942: $? = 0
+configure:4942: result: yes
+configure:4942: checking sys/time.h presence
+configure:4942:   conftest.c
+./configure: line 1542: conftest.c: command not found
+configure:4942: $? = 127
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "PfTools"
+| #define PACKAGE_TARNAME "pftools"
+| #define PACKAGE_VERSION "3.0"
+| #define PACKAGE_STRING "PfTools 3.0"
+| #define PACKAGE_BUGREPORT "thierry.schuepbach at isb-sib.ch"
+| #define PACKAGE_URL ""
+| #define PACKAGE "pftools"
+| #define VERSION "3.0"
+| #define HAVE_LIBM 1
+| #define HAVE_ALLOCA_H 1
+| #define HAVE_ALLOCA 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_LIMITS_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| /* end confdefs.h.  */
+| #include <sys/time.h>
+configure:4942: result: no
+configure:4942: WARNING: sys/time.h: accepted by the compiler, rejected by the preprocessor!
+configure:4942: WARNING: sys/time.h: proceeding with the compiler's result
+configure:4942: checking for sys/time.h
+configure:4942: result: yes
+configure:4942: checking unistd.h usability
+configure:4942: gcc -c -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse  conftest.c >&5
+configure:4942: $? = 0
+configure:4942: result: yes
+configure:4942: checking unistd.h presence
+configure:4942:   conftest.c
+./configure: line 1542: conftest.c: command not found
+configure:4942: $? = 127
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "PfTools"
+| #define PACKAGE_TARNAME "pftools"
+| #define PACKAGE_VERSION "3.0"
+| #define PACKAGE_STRING "PfTools 3.0"
+| #define PACKAGE_BUGREPORT "thierry.schuepbach at isb-sib.ch"
+| #define PACKAGE_URL ""
+| #define PACKAGE "pftools"
+| #define VERSION "3.0"
+| #define HAVE_LIBM 1
+| #define HAVE_ALLOCA_H 1
+| #define HAVE_ALLOCA 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_LIMITS_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_SYS_TIME_H 1
+| /* end confdefs.h.  */
+| #include <unistd.h>
+configure:4942: result: no
+configure:4942: WARNING: unistd.h: accepted by the compiler, rejected by the preprocessor!
+configure:4942: WARNING: unistd.h: proceeding with the compiler's result
+configure:4942: checking for unistd.h
+configure:4942: result: yes
+configure:4942: checking inttypes.h usability
+configure:4942: gcc -c -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse  conftest.c >&5
+configure:4942: $? = 0
+configure:4942: result: yes
+configure:4942: checking inttypes.h presence
+configure:4942:   conftest.c
+./configure: line 1542: conftest.c: command not found
+configure:4942: $? = 127
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "PfTools"
+| #define PACKAGE_TARNAME "pftools"
+| #define PACKAGE_VERSION "3.0"
+| #define PACKAGE_STRING "PfTools 3.0"
+| #define PACKAGE_BUGREPORT "thierry.schuepbach at isb-sib.ch"
+| #define PACKAGE_URL ""
+| #define PACKAGE "pftools"
+| #define VERSION "3.0"
+| #define HAVE_LIBM 1
+| #define HAVE_ALLOCA_H 1
+| #define HAVE_ALLOCA 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_LIMITS_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_UNISTD_H 1
+| /* end confdefs.h.  */
+| #include <inttypes.h>
+configure:4942: result: no
+configure:4942: WARNING: inttypes.h: accepted by the compiler, rejected by the preprocessor!
+configure:4942: WARNING: inttypes.h: proceeding with the compiler's result
+configure:4942: checking for inttypes.h
+configure:4942: result: yes
+configure:4942: checking mm_malloc.h usability
+configure:4942: gcc -c -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse  conftest.c >&5
+configure:4942: $? = 0
+configure:4942: result: yes
+configure:4942: checking mm_malloc.h presence
+configure:4942:   conftest.c
+./configure: line 1542: conftest.c: command not found
+configure:4942: $? = 127
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "PfTools"
+| #define PACKAGE_TARNAME "pftools"
+| #define PACKAGE_VERSION "3.0"
+| #define PACKAGE_STRING "PfTools 3.0"
+| #define PACKAGE_BUGREPORT "thierry.schuepbach at isb-sib.ch"
+| #define PACKAGE_URL ""
+| #define PACKAGE "pftools"
+| #define VERSION "3.0"
+| #define HAVE_LIBM 1
+| #define HAVE_ALLOCA_H 1
+| #define HAVE_ALLOCA 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_LIMITS_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_INTTYPES_H 1
+| /* end confdefs.h.  */
+| #include <mm_malloc.h>
+configure:4942: result: no
+configure:4942: WARNING: mm_malloc.h: accepted by the compiler, rejected by the preprocessor!
+configure:4942: WARNING: mm_malloc.h: proceeding with the compiler's result
+configure:4942: checking for mm_malloc.h
+configure:4942: result: yes
+configure:4956: checking for stdbool.h that conforms to C99
+configure:5023: gcc -c -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse  conftest.c >&5
+configure:5023: $? = 0
+configure:5030: result: yes
+configure:5032: checking for _Bool
+configure:5032: gcc -c -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse  conftest.c >&5
+configure:5032: $? = 0
+configure:5032: gcc -c -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse  conftest.c >&5
+conftest.c: In function 'main':
+conftest.c:58:20: error: expected expression before ')' token
+configure:5032: $? = 1
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "PfTools"
+| #define PACKAGE_TARNAME "pftools"
+| #define PACKAGE_VERSION "3.0"
+| #define PACKAGE_STRING "PfTools 3.0"
+| #define PACKAGE_BUGREPORT "thierry.schuepbach at isb-sib.ch"
+| #define PACKAGE_URL ""
+| #define PACKAGE "pftools"
+| #define VERSION "3.0"
+| #define HAVE_LIBM 1
+| #define HAVE_ALLOCA_H 1
+| #define HAVE_ALLOCA 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_LIMITS_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_MM_MALLOC_H 1
+| /* end confdefs.h.  */
+| #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
+| int
+| main ()
+| {
+| if (sizeof ((_Bool)))
+| 	    return 0;
+|   ;
+|   return 0;
+| }
+configure:5032: result: yes
+configure:5048: checking for gcc option to accept ISO C99
+configure:5197: gcc  -c -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse  conftest.c >&5
+conftest.c:74:29: error: expected ';', ',' or ')' before 'text'
+conftest.c: In function 'main':
+conftest.c:128:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'newvar'
+conftest.c:128:18: error: 'newvar' undeclared (first use in this function)
+conftest.c:128:18: note: each undeclared identifier is reported only once for each function it appears in
+conftest.c:138:3: error: 'for' loop initial declarations are only allowed in C99 mode
+conftest.c:138:3: note: use option -std=c99 or -std=gnu99 to compile your code
+configure:5197: $? = 1
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "PfTools"
+| #define PACKAGE_TARNAME "pftools"
+| #define PACKAGE_VERSION "3.0"
+| #define PACKAGE_STRING "PfTools 3.0"
+| #define PACKAGE_BUGREPORT "thierry.schuepbach at isb-sib.ch"
+| #define PACKAGE_URL ""
+| #define PACKAGE "pftools"
+| #define VERSION "3.0"
+| #define HAVE_LIBM 1
+| #define HAVE_ALLOCA_H 1
+| #define HAVE_ALLOCA 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_LIMITS_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_MM_MALLOC_H 1
+| #define HAVE__BOOL 1
+| #define HAVE_STDBOOL_H 1
+| /* end confdefs.h.  */
+| #include <stdarg.h>
+| #include <stdbool.h>
+| #include <stdlib.h>
+| #include <wchar.h>
+| #include <stdio.h>
+| 
+| // Check varargs macros.  These examples are taken from C99 6.10.3.5.
+| #define debug(...) fprintf (stderr, __VA_ARGS__)
+| #define showlist(...) puts (#__VA_ARGS__)
+| #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
+| static void
+| test_varargs_macros (void)
+| {
+|   int x = 1234;
+|   int y = 5678;
+|   debug ("Flag");
+|   debug ("X = %d\n", x);
+|   showlist (The first, second, and third items.);
+|   report (x>y, "x is %d but y is %d", x, y);
+| }
+| 
+| // Check long long types.
+| #define BIG64 18446744073709551615ull
+| #define BIG32 4294967295ul
+| #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
+| #if !BIG_OK
+|   your preprocessor is broken;
+| #endif
+| #if BIG_OK
+| #else
+|   your preprocessor is broken;
+| #endif
+| static long long int bignum = -9223372036854775807LL;
+| static unsigned long long int ubignum = BIG64;
+| 
+| struct incomplete_array
+| {
+|   int datasize;
+|   double data[];
+| };
+| 
+| struct named_init {
+|   int number;
+|   const wchar_t *name;
+|   double average;
+| };
+| 
+| typedef const char *ccp;
+| 
+| static inline int
+| test_restrict (ccp restrict text)
+| {
+|   // See if C++-style comments work.
+|   // Iterate through items via the restricted pointer.
+|   // Also check for declarations in for loops.
+|   for (unsigned int i = 0; *(text+i) != '\0'; ++i)
+|     continue;
+|   return 0;
+| }
+| 
+| // Check varargs and va_copy.
+| static void
+| test_varargs (const char *format, ...)
+| {
+|   va_list args;
+|   va_start (args, format);
+|   va_list args_copy;
+|   va_copy (args_copy, args);
+| 
+|   const char *str;
+|   int number;
+|   float fnumber;
+| 
+|   while (*format)
+|     {
+|       switch (*format++)
+| 	{
+| 	case 's': // string
+| 	  str = va_arg (args_copy, const char *);
+| 	  break;
+| 	case 'd': // int
+| 	  number = va_arg (args_copy, int);
+| 	  break;
+| 	case 'f': // float
+| 	  fnumber = va_arg (args_copy, double);
+| 	  break;
+| 	default:
+| 	  break;
+| 	}
+|     }
+|   va_end (args_copy);
+|   va_end (args);
+| }
+| 
+| int
+| main ()
+| {
+| 
+|   // Check bool.
+|   _Bool success = false;
+| 
+|   // Check restrict.
+|   if (test_restrict ("String literal") == 0)
+|     success = true;
+|   char *restrict newvar = "Another string";
+| 
+|   // Check varargs.
+|   test_varargs ("s, d' f .", "string", 65, 34.234);
+|   test_varargs_macros ();
+| 
+|   // Check flexible array members.
+|   struct incomplete_array *ia =
+|     malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
+|   ia->datasize = 10;
+|   for (int i = 0; i < ia->datasize; ++i)
+|     ia->data[i] = i * 1.234;
+| 
+|   // Check named initializers.
+|   struct named_init ni = {
+|     .number = 34,
+|     .name = L"Test wide string",
+|     .average = 543.34343,
+|   };
+| 
+|   ni.number = 58;
+| 
+|   int dynamic_array[ni.number];
+|   dynamic_array[ni.number - 1] = 543;
+| 
+|   // work around unused variable warnings
+|   return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
+| 	  || dynamic_array[ni.number - 1] != 543);
+| 
+|   ;
+|   return 0;
+| }
+configure:5197: gcc -std=gnu99 -c -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse  conftest.c >&5
+configure:5197: $? = 0
+configure:5217: result: -std=gnu99
+configure:5228: checking for inline
+configure:5244: gcc -std=gnu99 -c -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse  conftest.c >&5
+configure:5244: $? = 0
+configure:5252: result: inline
+configure:5270: checking for working volatile
+configure:5289: gcc -std=gnu99 -c -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse  conftest.c >&5
+configure:5289: $? = 0
+configure:5296: result: yes
+configure:5304: checking for an ANSI C-conforming const
+configure:5369: gcc -std=gnu99 -c -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse  conftest.c >&5
+configure:5369: $? = 0
+configure:5376: result: yes
+configure:5384: checking for C/C++ restrict keyword
+configure:5409: gcc -std=gnu99 -c -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse  conftest.c >&5
+configure:5409: $? = 0
+configure:5417: result: __restrict
+configure:5431: checking for off_t
+configure:5431: gcc -std=gnu99 -c -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse  conftest.c >&5
+configure:5431: $? = 0
+configure:5431: gcc -std=gnu99 -c -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse  conftest.c >&5
+conftest.c: In function 'main':
+conftest.c:61:20: error: expected expression before ')' token
+configure:5431: $? = 1
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "PfTools"
+| #define PACKAGE_TARNAME "pftools"
+| #define PACKAGE_VERSION "3.0"
+| #define PACKAGE_STRING "PfTools 3.0"
+| #define PACKAGE_BUGREPORT "thierry.schuepbach at isb-sib.ch"
+| #define PACKAGE_URL ""
+| #define PACKAGE "pftools"
+| #define VERSION "3.0"
+| #define HAVE_LIBM 1
+| #define HAVE_ALLOCA_H 1
+| #define HAVE_ALLOCA 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_LIMITS_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_MM_MALLOC_H 1
+| #define HAVE__BOOL 1
+| #define HAVE_STDBOOL_H 1
+| #define restrict __restrict
+| /* end confdefs.h.  */
+| #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
+| int
+| main ()
+| {
+| if (sizeof ((off_t)))
+| 	    return 0;
+|   ;
+|   return 0;
+| }
+configure:5431: result: yes
+configure:5442: checking for size_t
+configure:5442: result: yes
+configure:5453: checking for uid_t in sys/types.h
+./configure: line 5463: conftest.c: command not found
+configure:5472: result: no
+configure:5487: checking whether C compiler accepts -msse2
+configure:5506: gcc -std=gnu99 -c -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse  -msse2  conftest.c >&5
+configure:5506: $? = 0
+configure:5514: result: yes
+configure:5529: checking whether C compiler accepts -msse4.1
+configure:5548: gcc -std=gnu99 -c -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse  -msse4.1  conftest.c >&5
+configure:5548: $? = 0
+configure:5556: result: yes
+configure:5739: checking for the pthreads library -lpthreads
+configure:5777: gcc -std=gnu99 -o conftest -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse    conftest.c -lpthreads -lm  >&5
+/usr/bin/ld: cannot find -lpthreads
+collect2: error: ld returned 1 exit status
+configure:5777: $? = 1
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "PfTools"
+| #define PACKAGE_TARNAME "pftools"
+| #define PACKAGE_VERSION "3.0"
+| #define PACKAGE_STRING "PfTools 3.0"
+| #define PACKAGE_BUGREPORT "thierry.schuepbach at isb-sib.ch"
+| #define PACKAGE_URL ""
+| #define PACKAGE "pftools"
+| #define VERSION "3.0"
+| #define HAVE_LIBM 1
+| #define HAVE_ALLOCA_H 1
+| #define HAVE_ALLOCA 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_LIMITS_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_MM_MALLOC_H 1
+| #define HAVE__BOOL 1
+| #define HAVE_STDBOOL_H 1
+| #define restrict __restrict
+| #define uid_t int
+| #define gid_t int
+| /* end confdefs.h.  */
+| #include <pthread.h>
+|                         static void routine(void *a) { a = 0; }
+|                         static void *start_routine(void *a) { return a; }
+| int
+| main ()
+| {
+| pthread_t th; pthread_attr_t attr;
+|                         pthread_create(&th, 0, start_routine, 0);
+|                         pthread_join(th, 0);
+|                         pthread_attr_init(&attr);
+|                         pthread_cleanup_push(routine, 0);
+|                         pthread_cleanup_pop(0) /* ; */
+|   ;
+|   return 0;
+| }
+configure:5786: result: no
+configure:5684: checking whether pthreads work without any flags
+configure:5777: gcc -std=gnu99 -o conftest -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse    conftest.c  -lm  >&5
+/tmp/ccoD82q2.o: In function `main':
+conftest.c:(.text+0x42): undefined reference to `pthread_create'
+conftest.c:(.text+0x53): undefined reference to `pthread_join'
+conftest.c:(.text+0xbb): undefined reference to `__pthread_register_cancel'
+conftest.c:(.text+0xca): undefined reference to `__pthread_unregister_cancel'
+collect2: error: ld returned 1 exit status
+configure:5777: $? = 1
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "PfTools"
+| #define PACKAGE_TARNAME "pftools"
+| #define PACKAGE_VERSION "3.0"
+| #define PACKAGE_STRING "PfTools 3.0"
+| #define PACKAGE_BUGREPORT "thierry.schuepbach at isb-sib.ch"
+| #define PACKAGE_URL ""
+| #define PACKAGE "pftools"
+| #define VERSION "3.0"
+| #define HAVE_LIBM 1
+| #define HAVE_ALLOCA_H 1
+| #define HAVE_ALLOCA 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_LIMITS_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_MM_MALLOC_H 1
+| #define HAVE__BOOL 1
+| #define HAVE_STDBOOL_H 1
+| #define restrict __restrict
+| #define uid_t int
+| #define gid_t int
+| /* end confdefs.h.  */
+| #include <pthread.h>
+|                         static void routine(void *a) { a = 0; }
+|                         static void *start_routine(void *a) { return a; }
+| int
+| main ()
+| {
+| pthread_t th; pthread_attr_t attr;
+|                         pthread_create(&th, 0, start_routine, 0);
+|                         pthread_join(th, 0);
+|                         pthread_attr_init(&attr);
+|                         pthread_cleanup_push(routine, 0);
+|                         pthread_cleanup_pop(0) /* ; */
+|   ;
+|   return 0;
+| }
+configure:5786: result: no
+configure:5689: checking whether pthreads work with -Kthread
+configure:5777: gcc -std=gnu99 -o conftest -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse -Kthread   conftest.c  -lm  >&5
+gcc: error: unrecognized command line option '-Kthread'
+configure:5777: $? = 1
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "PfTools"
+| #define PACKAGE_TARNAME "pftools"
+| #define PACKAGE_VERSION "3.0"
+| #define PACKAGE_STRING "PfTools 3.0"
+| #define PACKAGE_BUGREPORT "thierry.schuepbach at isb-sib.ch"
+| #define PACKAGE_URL ""
+| #define PACKAGE "pftools"
+| #define VERSION "3.0"
+| #define HAVE_LIBM 1
+| #define HAVE_ALLOCA_H 1
+| #define HAVE_ALLOCA 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_LIMITS_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_MM_MALLOC_H 1
+| #define HAVE__BOOL 1
+| #define HAVE_STDBOOL_H 1
+| #define restrict __restrict
+| #define uid_t int
+| #define gid_t int
+| /* end confdefs.h.  */
+| #include <pthread.h>
+|                         static void routine(void *a) { a = 0; }
+|                         static void *start_routine(void *a) { return a; }
+| int
+| main ()
+| {
+| pthread_t th; pthread_attr_t attr;
+|                         pthread_create(&th, 0, start_routine, 0);
+|                         pthread_join(th, 0);
+|                         pthread_attr_init(&attr);
+|                         pthread_cleanup_push(routine, 0);
+|                         pthread_cleanup_pop(0) /* ; */
+|   ;
+|   return 0;
+| }
+configure:5786: result: no
+configure:5689: checking whether pthreads work with -kthread
+configure:5777: gcc -std=gnu99 -o conftest -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse -kthread   conftest.c  -lm  >&5
+gcc: error: unrecognized command line option '-kthread'
+configure:5777: $? = 1
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "PfTools"
+| #define PACKAGE_TARNAME "pftools"
+| #define PACKAGE_VERSION "3.0"
+| #define PACKAGE_STRING "PfTools 3.0"
+| #define PACKAGE_BUGREPORT "thierry.schuepbach at isb-sib.ch"
+| #define PACKAGE_URL ""
+| #define PACKAGE "pftools"
+| #define VERSION "3.0"
+| #define HAVE_LIBM 1
+| #define HAVE_ALLOCA_H 1
+| #define HAVE_ALLOCA 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_LIMITS_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_MM_MALLOC_H 1
+| #define HAVE__BOOL 1
+| #define HAVE_STDBOOL_H 1
+| #define restrict __restrict
+| #define uid_t int
+| #define gid_t int
+| /* end confdefs.h.  */
+| #include <pthread.h>
+|                         static void routine(void *a) { a = 0; }
+|                         static void *start_routine(void *a) { return a; }
+| int
+| main ()
+| {
+| pthread_t th; pthread_attr_t attr;
+|                         pthread_create(&th, 0, start_routine, 0);
+|                         pthread_join(th, 0);
+|                         pthread_attr_init(&attr);
+|                         pthread_cleanup_push(routine, 0);
+|                         pthread_cleanup_pop(0) /* ; */
+|   ;
+|   return 0;
+| }
+configure:5786: result: no
+configure:5739: checking for the pthreads library -llthread
+configure:5777: gcc -std=gnu99 -o conftest -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse    conftest.c -llthread -lm  >&5
+/usr/bin/ld: cannot find -llthread
+collect2: error: ld returned 1 exit status
+configure:5777: $? = 1
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "PfTools"
+| #define PACKAGE_TARNAME "pftools"
+| #define PACKAGE_VERSION "3.0"
+| #define PACKAGE_STRING "PfTools 3.0"
+| #define PACKAGE_BUGREPORT "thierry.schuepbach at isb-sib.ch"
+| #define PACKAGE_URL ""
+| #define PACKAGE "pftools"
+| #define VERSION "3.0"
+| #define HAVE_LIBM 1
+| #define HAVE_ALLOCA_H 1
+| #define HAVE_ALLOCA 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_LIMITS_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_MM_MALLOC_H 1
+| #define HAVE__BOOL 1
+| #define HAVE_STDBOOL_H 1
+| #define restrict __restrict
+| #define uid_t int
+| #define gid_t int
+| /* end confdefs.h.  */
+| #include <pthread.h>
+|                         static void routine(void *a) { a = 0; }
+|                         static void *start_routine(void *a) { return a; }
+| int
+| main ()
+| {
+| pthread_t th; pthread_attr_t attr;
+|                         pthread_create(&th, 0, start_routine, 0);
+|                         pthread_join(th, 0);
+|                         pthread_attr_init(&attr);
+|                         pthread_cleanup_push(routine, 0);
+|                         pthread_cleanup_pop(0) /* ; */
+|   ;
+|   return 0;
+| }
+configure:5786: result: no
+configure:5689: checking whether pthreads work with -pthread
+configure:5777: gcc -std=gnu99 -o conftest -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse -pthread   conftest.c  -lm  >&5
+configure:5777: $? = 0
+configure:5786: result: yes
+configure:5805: checking for joinable pthread attribute
+configure:5820: gcc -std=gnu99 -o conftest -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse -pthread   conftest.c  -lm  >&5
+configure:5820: $? = 0
+configure:5826: result: PTHREAD_CREATE_JOINABLE
+configure:5836: checking if more special flags are required for pthreads
+configure:5850: result: no
+configure:5856: checking for PTHREAD_PRIO_INHERIT
+configure:5874: gcc -std=gnu99 -o conftest -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse -pthread   conftest.c  -lm  >&5
+conftest.c: In function 'main':
+conftest.c:32:9: error: 'PTHREAD_PRIO_INHERIT' undeclared (first use in this function)
+conftest.c:32:9: note: each undeclared identifier is reported only once for each function it appears in
+configure:5874: $? = 1
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "PfTools"
+| #define PACKAGE_TARNAME "pftools"
+| #define PACKAGE_VERSION "3.0"
+| #define PACKAGE_STRING "PfTools 3.0"
+| #define PACKAGE_BUGREPORT "thierry.schuepbach at isb-sib.ch"
+| #define PACKAGE_URL ""
+| #define PACKAGE "pftools"
+| #define VERSION "3.0"
+| #define HAVE_LIBM 1
+| #define HAVE_ALLOCA_H 1
+| #define HAVE_ALLOCA 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_LIMITS_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_MM_MALLOC_H 1
+| #define HAVE__BOOL 1
+| #define HAVE_STDBOOL_H 1
+| #define restrict __restrict
+| #define uid_t int
+| #define gid_t int
+| /* end confdefs.h.  */
+| 
+|                     #include <pthread.h>
+| int
+| main ()
+| {
+| int i = PTHREAD_PRIO_INHERIT;
+|   ;
+|   return 0;
+| }
+configure:5883: result: no
+configure:5952: Posix thread found.
+configure:5970: checking for gfortran option to accept preprocessor commands
+configure:5975: result: -cpp
+configure:5995: checking for stdlib.h
+configure:5995: result: yes
+configure:6005: checking for GNU libc compatible malloc
+configure:6029: gcc -std=gnu99 -o conftest -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse   conftest.c -lm  >&5
+In file included from /usr/include/stdlib.h:320:0,
+                 from conftest.c:29:
+/usr/include/x86_64-linux-gnu/sys/types.h:66:17: error: two or more data types in declaration specifiers
+/usr/include/x86_64-linux-gnu/sys/types.h:81:17: error: two or more data types in declaration specifiers
+configure:6029: $? = 1
+configure: program exited with status 1
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "PfTools"
+| #define PACKAGE_TARNAME "pftools"
+| #define PACKAGE_VERSION "3.0"
+| #define PACKAGE_STRING "PfTools 3.0"
+| #define PACKAGE_BUGREPORT "thierry.schuepbach at isb-sib.ch"
+| #define PACKAGE_URL ""
+| #define PACKAGE "pftools"
+| #define VERSION "3.0"
+| #define HAVE_LIBM 1
+| #define HAVE_ALLOCA_H 1
+| #define HAVE_ALLOCA 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_LIMITS_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_MM_MALLOC_H 1
+| #define HAVE__BOOL 1
+| #define HAVE_STDBOOL_H 1
+| #define restrict __restrict
+| #define uid_t int
+| #define gid_t int
+| #define HAVE_STDLIB_H 1
+| /* end confdefs.h.  */
+| #if defined STDC_HEADERS || defined HAVE_STDLIB_H
+| # include <stdlib.h>
+| #else
+| char *malloc ();
+| #endif
+| 
+| int
+| main ()
+| {
+| return ! malloc (0);
+|   ;
+|   return 0;
+| }
+configure:6039: result: no
+configure:6068: checking for stdlib.h
+configure:6068: result: yes
+configure:6068: checking for unistd.h
+configure:6068: result: yes
+configure:6068: checking for sys/param.h
+configure:6068: gcc -std=gnu99 -c -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse  conftest.c >&5
+In file included from /usr/include/stdlib.h:320:0,
+                 from conftest.c:44:
+/usr/include/x86_64-linux-gnu/sys/types.h:66:17: error: two or more data types in declaration specifiers
+/usr/include/x86_64-linux-gnu/sys/types.h:81:17: error: two or more data types in declaration specifiers
+configure:6068: $? = 1
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "PfTools"
+| #define PACKAGE_TARNAME "pftools"
+| #define PACKAGE_VERSION "3.0"
+| #define PACKAGE_STRING "PfTools 3.0"
+| #define PACKAGE_BUGREPORT "thierry.schuepbach at isb-sib.ch"
+| #define PACKAGE_URL ""
+| #define PACKAGE "pftools"
+| #define VERSION "3.0"
+| #define HAVE_LIBM 1
+| #define HAVE_ALLOCA_H 1
+| #define HAVE_ALLOCA 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_LIMITS_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_MM_MALLOC_H 1
+| #define HAVE__BOOL 1
+| #define HAVE_STDBOOL_H 1
+| #define restrict __restrict
+| #define uid_t int
+| #define gid_t int
+| #define HAVE_STDLIB_H 1
+| #define HAVE_MALLOC 0
+| #define malloc rpl_malloc
+| #define HAVE_STDLIB_H 1
+| #define HAVE_UNISTD_H 1
+| /* end confdefs.h.  */
+| #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
+| 
+| #include <sys/param.h>
+configure:6068: result: no
+configure:6088: checking for getpagesize
+configure:6088: gcc -std=gnu99 -o conftest -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse   conftest.c -lm  >&5
+configure:6088: $? = 0
+configure:6088: result: yes
+configure:6097: checking for working mmap
+configure:6244: gcc -std=gnu99 -o conftest -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse   conftest.c -lm  >&5
+In file included from /usr/include/stdlib.h:320:0,
+                 from conftest.c:45:
+/usr/include/x86_64-linux-gnu/sys/types.h:66:17: error: two or more data types in declaration specifiers
+/usr/include/x86_64-linux-gnu/sys/types.h:81:17: error: two or more data types in declaration specifiers
+conftest.c: In function 'main':
+conftest.c:141:3: warning: implicit declaration of function 'malloc' [-Wimplicit-function-declaration]
+conftest.c:141:19: warning: incompatible implicit declaration of built-in function 'malloc' [enabled by default]
+conftest.c:146:3: warning: implicit declaration of function 'umask' [-Wimplicit-function-declaration]
+configure:6244: $? = 1
+configure: program exited with status 1
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "PfTools"
+| #define PACKAGE_TARNAME "pftools"
+| #define PACKAGE_VERSION "3.0"
+| #define PACKAGE_STRING "PfTools 3.0"
+| #define PACKAGE_BUGREPORT "thierry.schuepbach at isb-sib.ch"
+| #define PACKAGE_URL ""
+| #define PACKAGE "pftools"
+| #define VERSION "3.0"
+| #define HAVE_LIBM 1
+| #define HAVE_ALLOCA_H 1
+| #define HAVE_ALLOCA 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_LIMITS_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_MM_MALLOC_H 1
+| #define HAVE__BOOL 1
+| #define HAVE_STDBOOL_H 1
+| #define restrict __restrict
+| #define uid_t int
+| #define gid_t int
+| #define HAVE_STDLIB_H 1
+| #define HAVE_MALLOC 0
+| #define malloc rpl_malloc
+| #define HAVE_STDLIB_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_GETPAGESIZE 1
+| /* end confdefs.h.  */
+| #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
+| /* malloc might have been renamed as rpl_malloc. */
+| #undef malloc
+| 
+| /* Thanks to Mike Haertel and Jim Avera for this test.
+|    Here is a matrix of mmap possibilities:
+| 	mmap private not fixed
+| 	mmap private fixed at somewhere currently unmapped
+| 	mmap private fixed at somewhere already mapped
+| 	mmap shared not fixed
+| 	mmap shared fixed at somewhere currently unmapped
+| 	mmap shared fixed at somewhere already mapped
+|    For private mappings, we should verify that changes cannot be read()
+|    back from the file, nor mmap's back from the file at a different
+|    address.  (There have been systems where private was not correctly
+|    implemented like the infamous i386 svr4.0, and systems where the
+|    VM page cache was not coherent with the file system buffer cache
+|    like early versions of FreeBSD and possibly contemporary NetBSD.)
+|    For shared mappings, we should conversely verify that changes get
+|    propagated back to all the places they're supposed to be.
+| 
+|    Grep wants private fixed already mapped.
+|    The main things grep needs to know about mmap are:
+|    * does it exist and is it safe to write into the mmap'd area
+|    * how to use it (BSD variants)  */
+| 
+| #include <fcntl.h>
+| #include <sys/mman.h>
+| 
+| #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
+| char *malloc ();
+| #endif
+| 
+| /* This mess was copied from the GNU getpagesize.h.  */
+| #ifndef HAVE_GETPAGESIZE
+| # ifdef _SC_PAGESIZE
+| #  define getpagesize() sysconf(_SC_PAGESIZE)
+| # else /* no _SC_PAGESIZE */
+| #  ifdef HAVE_SYS_PARAM_H
+| #   include <sys/param.h>
+| #   ifdef EXEC_PAGESIZE
+| #    define getpagesize() EXEC_PAGESIZE
+| #   else /* no EXEC_PAGESIZE */
+| #    ifdef NBPG
+| #     define getpagesize() NBPG * CLSIZE
+| #     ifndef CLSIZE
+| #      define CLSIZE 1
+| #     endif /* no CLSIZE */
+| #    else /* no NBPG */
+| #     ifdef NBPC
+| #      define getpagesize() NBPC
+| #     else /* no NBPC */
+| #      ifdef PAGESIZE
+| #       define getpagesize() PAGESIZE
+| #      endif /* PAGESIZE */
+| #     endif /* no NBPC */
+| #    endif /* no NBPG */
+| #   endif /* no EXEC_PAGESIZE */
+| #  else /* no HAVE_SYS_PARAM_H */
+| #   define getpagesize() 8192	/* punt totally */
+| #  endif /* no HAVE_SYS_PARAM_H */
+| # endif /* no _SC_PAGESIZE */
+| 
+| #endif /* no HAVE_GETPAGESIZE */
+| 
+| int
+| main ()
+| {
+|   char *data, *data2, *data3;
+|   const char *cdata2;
+|   int i, pagesize;
+|   int fd, fd2;
+| 
+|   pagesize = getpagesize ();
+| 
+|   /* First, make a file with some known garbage in it. */
+|   data = (char *) malloc (pagesize);
+|   if (!data)
+|     return 1;
+|   for (i = 0; i < pagesize; ++i)
+|     *(data + i) = rand ();
+|   umask (0);
+|   fd = creat ("conftest.mmap", 0600);
+|   if (fd < 0)
+|     return 2;
+|   if (write (fd, data, pagesize) != pagesize)
+|     return 3;
+|   close (fd);
+| 
+|   /* Next, check that the tail of a page is zero-filled.  File must have
+|      non-zero length, otherwise we risk SIGBUS for entire page.  */
+|   fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
+|   if (fd2 < 0)
+|     return 4;
+|   cdata2 = "";
+|   if (write (fd2, cdata2, 1) != 1)
+|     return 5;
+|   data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
+|   if (data2 == MAP_FAILED)
+|     return 6;
+|   for (i = 0; i < pagesize; ++i)
+|     if (*(data2 + i))
+|       return 7;
+|   close (fd2);
+|   if (munmap (data2, pagesize))
+|     return 8;
+| 
+|   /* Next, try to mmap the file at a fixed address which already has
+|      something else allocated at it.  If we can, also make sure that
+|      we see the same garbage.  */
+|   fd = open ("conftest.mmap", O_RDWR);
+|   if (fd < 0)
+|     return 9;
+|   if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
+| 		     MAP_PRIVATE | MAP_FIXED, fd, 0L))
+|     return 10;
+|   for (i = 0; i < pagesize; ++i)
+|     if (*(data + i) != *(data2 + i))
+|       return 11;
+| 
+|   /* Finally, make sure that changes to the mapped area do not
+|      percolate back to the file as seen by read().  (This is a bug on
+|      some variants of i386 svr4.0.)  */
+|   for (i = 0; i < pagesize; ++i)
+|     *(data2 + i) = *(data2 + i) + 1;
+|   data3 = (char *) malloc (pagesize);
+|   if (!data3)
+|     return 12;
+|   if (read (fd, data3, pagesize) != pagesize)
+|     return 13;
+|   for (i = 0; i < pagesize; ++i)
+|     if (*(data + i) != *(data3 + i))
+|       return 14;
+|   close (fd);
+|   return 0;
+| }
+configure:6254: result: no
+configure:6282: checking for sched_setaffinity
+configure:6282: gcc -std=gnu99 -o conftest -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse   conftest.c -lm  >&5
+configure:6282: $? = 0
+configure:6282: result: yes
+configure:6282: checking for sched_getaffinity
+configure:6282: gcc -std=gnu99 -o conftest -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse   conftest.c -lm  >&5
+configure:6282: $? = 0
+configure:6282: result: yes
+configure:6282: checking for bindprocessor
+configure:6282: gcc -std=gnu99 -o conftest -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse   conftest.c -lm  >&5
+/tmp/ccTVlsYb.o: In function `main':
+conftest.c:(.text+0xa): undefined reference to `bindprocessor'
+collect2: error: ld returned 1 exit status
+configure:6282: $? = 1
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "PfTools"
+| #define PACKAGE_TARNAME "pftools"
+| #define PACKAGE_VERSION "3.0"
+| #define PACKAGE_STRING "PfTools 3.0"
+| #define PACKAGE_BUGREPORT "thierry.schuepbach at isb-sib.ch"
+| #define PACKAGE_URL ""
+| #define PACKAGE "pftools"
+| #define VERSION "3.0"
+| #define HAVE_LIBM 1
+| #define HAVE_ALLOCA_H 1
+| #define HAVE_ALLOCA 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_LIMITS_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_MM_MALLOC_H 1
+| #define HAVE__BOOL 1
+| #define HAVE_STDBOOL_H 1
+| #define restrict __restrict
+| #define uid_t int
+| #define gid_t int
+| #define HAVE_STDLIB_H 1
+| #define HAVE_MALLOC 0
+| #define malloc rpl_malloc
+| #define HAVE_STDLIB_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_GETPAGESIZE 1
+| #define HAVE_SCHED_SETAFFINITY 1
+| #define HAVE_SCHED_GETAFFINITY 1
+| /* end confdefs.h.  */
+| /* Define bindprocessor to an innocuous variant, in case <limits.h> declares bindprocessor.
+|    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+| #define bindprocessor innocuous_bindprocessor
+| 
+| /* System header to define __stub macros and hopefully few prototypes,
+|     which can conflict with char bindprocessor (); 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 bindprocessor
+| 
+| /* 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 bindprocessor ();
+| /* 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_bindprocessor || defined __stub___bindprocessor
+| choke me
+| #endif
+| 
+| int
+| main ()
+| {
+| return bindprocessor ();
+|   ;
+|   return 0;
+| }
+configure:6282: result: no
+configure:6282: checking for thread_policy_set
+configure:6282: gcc -std=gnu99 -o conftest -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse   conftest.c -lm  >&5
+/tmp/ccqduryi.o: In function `main':
+conftest.c:(.text+0xa): undefined reference to `thread_policy_set'
+collect2: error: ld returned 1 exit status
+configure:6282: $? = 1
+configure: failed program was:
+| /* confdefs.h */
+| #define PACKAGE_NAME "PfTools"
+| #define PACKAGE_TARNAME "pftools"
+| #define PACKAGE_VERSION "3.0"
+| #define PACKAGE_STRING "PfTools 3.0"
+| #define PACKAGE_BUGREPORT "thierry.schuepbach at isb-sib.ch"
+| #define PACKAGE_URL ""
+| #define PACKAGE "pftools"
+| #define VERSION "3.0"
+| #define HAVE_LIBM 1
+| #define HAVE_ALLOCA_H 1
+| #define HAVE_ALLOCA 1
+| #define HAVE_FCNTL_H 1
+| #define HAVE_LIMITS_H 1
+| #define HAVE_STDLIB_H 1
+| #define HAVE_STRING_H 1
+| #define HAVE_SYS_TIME_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_INTTYPES_H 1
+| #define HAVE_MM_MALLOC_H 1
+| #define HAVE__BOOL 1
+| #define HAVE_STDBOOL_H 1
+| #define restrict __restrict
+| #define uid_t int
+| #define gid_t int
+| #define HAVE_STDLIB_H 1
+| #define HAVE_MALLOC 0
+| #define malloc rpl_malloc
+| #define HAVE_STDLIB_H 1
+| #define HAVE_UNISTD_H 1
+| #define HAVE_GETPAGESIZE 1
+| #define HAVE_SCHED_SETAFFINITY 1
+| #define HAVE_SCHED_GETAFFINITY 1
+| /* end confdefs.h.  */
+| /* Define thread_policy_set to an innocuous variant, in case <limits.h> declares thread_policy_set.
+|    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+| #define thread_policy_set innocuous_thread_policy_set
+| 
+| /* System header to define __stub macros and hopefully few prototypes,
+|     which can conflict with char thread_policy_set (); 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 thread_policy_set
+| 
+| /* 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 thread_policy_set ();
+| /* 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_thread_policy_set || defined __stub___thread_policy_set
+| choke me
+| #endif
+| 
+| int
+| main ()
+| {
+| return thread_policy_set ();
+|   ;
+|   return 0;
+| }
+configure:6282: result: no
+configure:6293: checking whether cpu_set_t available
+configure:6310: gcc -std=gnu99 -c -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse  conftest.c >&5
+configure:6310: $? = 0
+configure:6317: result: yes
+configure:6324: checking whether the CPU_SET and CPU_ZERO macros are defined
+configure:6344: gcc -std=gnu99 -o conftest -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse   conftest.c -lm  >&5
+configure:6344: $? = 0
+configure:6355: result: yes
+configure:6368: checking pthread_attr_setaffinity_np
+configure:6394: gcc -std=gnu99 -o conftest -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse -pthread   conftest.c -lm   >&5
+configure:6394: $? = 0
+configure:6399: result: yes
+configure:6463: checking for gettimeofday
+configure:6463: gcc -std=gnu99 -o conftest -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse   conftest.c -lm  >&5
+configure:6463: $? = 0
+configure:6463: result: yes
+configure:6463: checking for memset
+configure:6463: gcc -std=gnu99 -o conftest -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse   conftest.c -lm  >&5
+conftest.c:62:6: warning: conflicting types for built-in function 'memset' [enabled by default]
+configure:6463: $? = 0
+configure:6463: result: yes
+configure:6463: checking for munmap
+configure:6463: gcc -std=gnu99 -o conftest -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse   conftest.c -lm  >&5
+configure:6463: $? = 0
+configure:6463: result: yes
+configure:6463: checking for strtol
+configure:6463: gcc -std=gnu99 -o conftest -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse   conftest.c -lm  >&5
+configure:6463: $? = 0
+configure:6463: result: yes
+configure:6463: checking for memcpy
+configure:6463: gcc -std=gnu99 -o conftest -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse   conftest.c -lm  >&5
+conftest.c:65:6: warning: conflicting types for built-in function 'memcpy' [enabled by default]
+configure:6463: $? = 0
+configure:6463: result: yes
+configure:6463: checking for fseek
+configure:6463: gcc -std=gnu99 -o conftest -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse   conftest.c -lm  >&5
+configure:6463: $? = 0
+configure:6463: result: yes
+configure:6463: checking for ftell
+configure:6463: gcc -std=gnu99 -o conftest -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse   conftest.c -lm  >&5
+configure:6463: $? = 0
+configure:6463: result: yes
+configure:6608: creating ./config.status
+
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+
+ac_cv_build=x86_64-unknown-linux-gnu
+ac_cv_c_compiler_gnu=yes
+ac_cv_c_const=yes
+ac_cv_c_inline=inline
+ac_cv_c_restrict=__restrict
+ac_cv_c_volatile=yes
+ac_cv_env_CC_set=
+ac_cv_env_CC_value=
+ac_cv_env_CFLAGS_set=set
+ac_cv_env_CFLAGS_value='-mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse'
+ac_cv_env_CPPFLAGS_set=
+ac_cv_env_CPPFLAGS_value=
+ac_cv_env_CPP_set=
+ac_cv_env_CPP_value=
+ac_cv_env_F77_set=
+ac_cv_env_F77_value=
+ac_cv_env_FFLAGS_set=set
+ac_cv_env_FFLAGS_value='-mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse'
+ac_cv_env_LDFLAGS_set=
+ac_cv_env_LDFLAGS_value=
+ac_cv_env_LIBS_set=
+ac_cv_env_LIBS_value=
+ac_cv_env_build_alias_set=
+ac_cv_env_build_alias_value=
+ac_cv_env_host_alias_set=
+ac_cv_env_host_alias_value=
+ac_cv_env_target_alias_set=
+ac_cv_env_target_alias_value=
+ac_cv_f77_compiler_gnu=yes
+ac_cv_func_alloca_works=yes
+ac_cv_func_bindprocessor=no
+ac_cv_func_fseek=yes
+ac_cv_func_ftell=yes
+ac_cv_func_getpagesize=yes
+ac_cv_func_gettimeofday=yes
+ac_cv_func_malloc_0_nonnull=no
+ac_cv_func_memcpy=yes
+ac_cv_func_memset=yes
+ac_cv_func_mmap_fixed_mapped=no
+ac_cv_func_munmap=yes
+ac_cv_func_sched_getaffinity=yes
+ac_cv_func_sched_setaffinity=yes
+ac_cv_func_strtol=yes
+ac_cv_func_thread_policy_set=no
+ac_cv_header_fcntl_h=yes
+ac_cv_header_inttypes_h=yes
+ac_cv_header_limits_h=yes
+ac_cv_header_mm_malloc_h=yes
+ac_cv_header_stdbool_h=yes
+ac_cv_header_stdlib_h=yes
+ac_cv_header_string_h=yes
+ac_cv_header_sys_param_h=no
+ac_cv_header_sys_time_h=yes
+ac_cv_header_unistd_h=yes
+ac_cv_host=x86_64-unknown-linux-gnu
+ac_cv_lib_m_expf=yes
+ac_cv_objext=o
+ac_cv_path_install='/usr/bin/install -c'
+ac_cv_path_mkdir=/bin/mkdir
+ac_cv_prog_AWK=mawk
+ac_cv_prog_ac_ct_CC=gcc
+ac_cv_prog_ac_ct_F77=gfortran
+ac_cv_prog_cc_c89=
+ac_cv_prog_cc_c99=-std=gnu99
+ac_cv_prog_cc_g=yes
+ac_cv_prog_cc_gcc_c_o=yes
+ac_cv_prog_f77_g=yes
+ac_cv_prog_make_make_set=yes
+ac_cv_target=x86_64-unknown-linux-gnu
+ac_cv_type__Bool=yes
+ac_cv_type_off_t=yes
+ac_cv_type_size_t=yes
+ac_cv_type_uid_t=no
+ac_cv_working_alloca_h=yes
+am_cv_CC_dependencies_compiler_type=gcc3
+ax_cv_PTHREAD_PRIO_INHERIT=no
+ax_cv_c_compiler_vendor=gnu
+ax_cv_check_cflags___msse2=yes
+ax_cv_check_cflags___msse4_1=yes
+pac_cv_cpu_set_defined=yes
+pac_cv_have_cpu_set_t=yes
+
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+
+ACLOCAL='${SHELL} /home/lcerutti/home/projects/prosite/prfh/pftools/branches/pftools/missing --run aclocal-1.11'
+ALLOCA=''
+AMDEPBACKSLASH='\'
+AMDEP_FALSE='#'
+AMDEP_TRUE=''
+AMTAR='${SHELL} /home/lcerutti/home/projects/prosite/prfh/pftools/branches/pftools/missing --run tar'
+AUTOCONF='${SHELL} /home/lcerutti/home/projects/prosite/prfh/pftools/branches/pftools/missing --run autoconf'
+AUTOHEADER='${SHELL} /home/lcerutti/home/projects/prosite/prfh/pftools/branches/pftools/missing --run autoheader'
+AUTOMAKE='${SHELL} /home/lcerutti/home/projects/prosite/prfh/pftools/branches/pftools/missing --run automake-1.11'
+AWK='mawk'
+CC='gcc -std=gnu99'
+CCDEPMODE='depmode=gcc3'
+CFLAGS='-mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse'
+CPP=''
+CPPFLAGS=''
+CYGPATH_W='echo'
+DEFS='-DHAVE_CONFIG_H'
+DEPDIR='.deps'
+ECHO_C=''
+ECHO_N='-n'
+ECHO_T=''
+EGREP=''
+EXEEXT=''
+F77='gfortran'
+FFLAGS='-mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse'
+FPP_OPTION='-cpp'
+GREP=''
+INSTALL_DATA='${INSTALL} -m 644'
+INSTALL_PROGRAM='${INSTALL}'
+INSTALL_SCRIPT='${INSTALL}'
+INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
+INTEL_IMF=''
+LDFLAGS=''
+LIBOBJS=' ${LIBOBJDIR}malloc$U.o'
+LIBS='-lm '
+LTLIBOBJS=' ${LIBOBJDIR}malloc$U.lo'
+MAKEINFO='${SHELL} /home/lcerutti/home/projects/prosite/prfh/pftools/branches/pftools/missing --run makeinfo'
+MKDIR_P='/bin/mkdir -p'
+OBJEXT='o'
+PACKAGE='pftools'
+PACKAGE_BUGREPORT='thierry.schuepbach at isb-sib.ch'
+PACKAGE_NAME='PfTools'
+PACKAGE_STRING='PfTools 3.0'
+PACKAGE_TARNAME='pftools'
+PACKAGE_URL=''
+PACKAGE_VERSION='3.0'
+PATH_SEPARATOR=':'
+PTHREAD_CC='gcc -std=gnu99'
+PTHREAD_CFLAGS='-pthread'
+PTHREAD_LIBS=''
+SET_MAKE=''
+SHELL='/bin/bash'
+SIMD_SSE2_CFLAGS='-msse2'
+SIMD_SSE4_1_CFLAGS='-msse4.1'
+STRIP=''
+USE_AFFINITY='-D__USE_AFFINITY__'
+USE_MMAP='-D__USE_MMAP__'
+VERSION='3.0'
+ac_ct_CC='gcc'
+ac_ct_F77='gfortran'
+am__EXEEXT_FALSE=''
+am__EXEEXT_TRUE='#'
+am__fastdepCC_FALSE='#'
+am__fastdepCC_TRUE=''
+am__include='include'
+am__isrc=''
+am__leading_dot='.'
+am__quote=''
+am__tar='${AMTAR} chof - "$$tardir"'
+am__untar='${AMTAR} xf -'
+ax_pthread_config=''
+bindir='${exec_prefix}/bin'
+build='x86_64-unknown-linux-gnu'
+build_alias=''
+build_cpu='x86_64'
+build_os='linux-gnu'
+build_vendor='unknown'
+datadir='${datarootdir}'
+datarootdir='${prefix}/share'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+dvidir='${docdir}'
+exec_prefix='${prefix}'
+host='x86_64-unknown-linux-gnu'
+host_alias=''
+host_cpu='x86_64'
+host_os='linux-gnu'
+host_vendor='unknown'
+htmldir='${docdir}'
+includedir='${prefix}/include'
+infodir='${datarootdir}/info'
+install_sh='${SHELL} /home/lcerutti/home/projects/prosite/prfh/pftools/branches/pftools/install-sh'
+libdir='${exec_prefix}/lib'
+libexecdir='${exec_prefix}/libexec'
+localedir='${datarootdir}/locale'
+localstatedir='${prefix}/var'
+mandir='${datarootdir}/man'
+mkdir_p='/bin/mkdir -p'
+oldincludedir='/usr/include'
+pdfdir='${docdir}'
+prefix='/usr/local'
+program_transform_name='s,x,x,'
+psdir='${docdir}'
+sbindir='${exec_prefix}/sbin'
+sharedstatedir='${prefix}/com'
+sysconfdir='${prefix}/etc'
+target='x86_64-unknown-linux-gnu'
+target_alias=''
+target_cpu='x86_64'
+target_os='linux-gnu'
+target_vendor='unknown'
+
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+
+/* confdefs.h */
+#define PACKAGE_NAME "PfTools"
+#define PACKAGE_TARNAME "pftools"
+#define PACKAGE_VERSION "3.0"
+#define PACKAGE_STRING "PfTools 3.0"
+#define PACKAGE_BUGREPORT "thierry.schuepbach at isb-sib.ch"
+#define PACKAGE_URL ""
+#define PACKAGE "pftools"
+#define VERSION "3.0"
+#define HAVE_LIBM 1
+#define HAVE_ALLOCA_H 1
+#define HAVE_ALLOCA 1
+#define HAVE_FCNTL_H 1
+#define HAVE_LIMITS_H 1
+#define HAVE_STDLIB_H 1
+#define HAVE_STRING_H 1
+#define HAVE_SYS_TIME_H 1
+#define HAVE_UNISTD_H 1
+#define HAVE_INTTYPES_H 1
+#define HAVE_MM_MALLOC_H 1
+#define HAVE__BOOL 1
+#define HAVE_STDBOOL_H 1
+#define restrict __restrict
+#define uid_t int
+#define gid_t int
+#define HAVE_STDLIB_H 1
+#define HAVE_MALLOC 0
+#define malloc rpl_malloc
+#define HAVE_STDLIB_H 1
+#define HAVE_UNISTD_H 1
+#define HAVE_GETPAGESIZE 1
+#define HAVE_SCHED_SETAFFINITY 1
+#define HAVE_SCHED_GETAFFINITY 1
+#define HAVE_CPU_SET_T 1
+#define HAVE_CPU_SET_MACROS 1
+#define HAVE_PTHREAD_AFFINITY_NP 1
+#define HAVE_GETTIMEOFDAY 1
+#define HAVE_MEMSET 1
+#define HAVE_MUNMAP 1
+#define HAVE_STRTOL 1
+#define HAVE_MEMCPY 1
+#define HAVE_FSEEK 1
+#define HAVE_FTELL 1
+
+configure: exit 0
+
+## ---------------------- ##
+## Running config.status. ##
+## ---------------------- ##
+
+This file was extended by PfTools config.status 3.0, which was
+generated by GNU Autoconf 2.68.  Invocation command line was
+
+  CONFIG_FILES    = 
+  CONFIG_HEADERS  = 
+  CONFIG_LINKS    = 
+  CONFIG_COMMANDS = 
+  $ ./config.status 
+
+on sib-pc42
+
+config.status:911: creating Makefile
+config.status:911: creating src/Fortran/Makefile
+config.status:911: creating src/C/Makefile
+config.status:911: creating src/C/include/config.h
+config.status:1092: src/C/include/config.h is unchanged
+config.status:1140: executing depfiles commands
diff --git a/config.status b/config.status
new file mode 100755
index 0000000..b94b22a
--- /dev/null
+++ b/config.status
@@ -0,0 +1,1247 @@
+#! /bin/bash
+# Generated by configure.
+# 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-/bin/bash}
+export SHELL
+## -------------------- ##
+## 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. ##
+## ----------------------------------- ##
+# 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 PfTools $as_me 3.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`
+"
+
+# Files that config.status was made for.
+config_files=" Makefile src/Fortran/Makefile src/C/Makefile"
+config_headers=" src/C/include/config.h"
+config_commands=" depfiles"
+
+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 <thierry.schuepbach at isb-sib.ch>."
+
+ac_cs_config="'--enable-mmap' '--enable-thread-affinity' 'CFLAGS=-mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse' 'FFLAGS=-mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse'"
+ac_cs_version="\
+PfTools config.status 3.0
+configured by ./configure, 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='/home/lcerutti/home/projects/prosite/prfh/pftools/branches/pftools'
+srcdir='.'
+INSTALL='/usr/bin/install -c'
+MKDIR_P='/bin/mkdir -p'
+AWK='mawk'
+test -n "$AWK" || AWK=awk
+# 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
+
+if $ac_cs_recheck; then
+  set X '/bin/bash' './configure'  '--enable-mmap' '--enable-thread-affinity' 'CFLAGS=-mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse' 'FFLAGS=-mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse' $ac_configure_extra_args --no-create --no-recursion
+  shift
+  $as_echo "running CONFIG_SHELL=/bin/bash $*" >&6
+  CONFIG_SHELL='/bin/bash'
+  export CONFIG_SHELL
+  exec "$@"
+fi
+
+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
+
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="" ac_aux_dir="."
+
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+  case $ac_config_target in
+    "src/C/include/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/C/include/config.h" ;;
+    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+    "src/Fortran/Makefile") CONFIG_FILES="$CONFIG_FILES src/Fortran/Makefile" ;;
+    "src/C/Makefile") CONFIG_FILES="$CONFIG_FILES src/C/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" &&
+cat >>"$ac_tmp/subs1.awk" <<\_ACAWK &&
+S["am__EXEEXT_FALSE"]=""
+S["am__EXEEXT_TRUE"]="#"
+S["LTLIBOBJS"]=" ${LIBOBJDIR}malloc$U.lo"
+S["USE_AFFINITY"]="-D__USE_AFFINITY__"
+S["USE_MMAP"]="-D__USE_MMAP__"
+S["LIBOBJS"]=" ${LIBOBJDIR}malloc$U.o"
+S["FPP_OPTION"]="-cpp"
+S["PTHREAD_CFLAGS"]="-pthread"
+S["PTHREAD_LIBS"]=""
+S["PTHREAD_CC"]="gcc -std=gnu99"
+S["ax_pthread_config"]=""
+S["SIMD_SSE4_1_CFLAGS"]="-msse4.1"
+S["SIMD_SSE2_CFLAGS"]="-msse2"
+S["ALLOCA"]=""
+S["INTEL_IMF"]=""
+S["EGREP"]=""
+S["GREP"]=""
+S["CPP"]=""
+S["am__fastdepCC_FALSE"]="#"
+S["am__fastdepCC_TRUE"]=""
+S["CCDEPMODE"]="depmode=gcc3"
+S["AMDEPBACKSLASH"]="\\"
+S["AMDEP_FALSE"]="#"
+S["AMDEP_TRUE"]=""
+S["am__quote"]=""
+S["am__include"]="include"
+S["DEPDIR"]=".deps"
+S["ac_ct_CC"]="gcc"
+S["CPPFLAGS"]=""
+S["CFLAGS"]="-mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse"
+S["CC"]="gcc -std=gnu99"
+S["OBJEXT"]="o"
+S["EXEEXT"]=""
+S["ac_ct_F77"]="gfortran"
+S["LDFLAGS"]=""
+S["FFLAGS"]="-mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse"
+S["F77"]="gfortran"
+S["am__untar"]="${AMTAR} xf -"
+S["am__tar"]="${AMTAR} chof - \"$$tardir\""
+S["AMTAR"]="${SHELL} /home/lcerutti/home/projects/prosite/prfh/pftools/branches/pftools/missing --run tar"
+S["am__leading_dot"]="."
+S["SET_MAKE"]=""
+S["AWK"]="mawk"
+S["mkdir_p"]="/bin/mkdir -p"
+S["MKDIR_P"]="/bin/mkdir -p"
+S["INSTALL_STRIP_PROGRAM"]="$(install_sh) -c -s"
+S["STRIP"]=""
+S["install_sh"]="${SHELL} /home/lcerutti/home/projects/prosite/prfh/pftools/branches/pftools/install-sh"
+S["MAKEINFO"]="${SHELL} /home/lcerutti/home/projects/prosite/prfh/pftools/branches/pftools/missing --run makeinfo"
+S["AUTOHEADER"]="${SHELL} /home/lcerutti/home/projects/prosite/prfh/pftools/branches/pftools/missing --run autoheader"
+S["AUTOMAKE"]="${SHELL} /home/lcerutti/home/projects/prosite/prfh/pftools/branches/pftools/missing --run automake-1.11"
+S["AUTOCONF"]="${SHELL} /home/lcerutti/home/projects/prosite/prfh/pftools/branches/pftools/missing --run autoconf"
+S["ACLOCAL"]="${SHELL} /home/lcerutti/home/projects/prosite/prfh/pftools/branches/pftools/missing --run aclocal-1.11"
+S["VERSION"]="3.0"
+S["PACKAGE"]="pftools"
+S["CYGPATH_W"]="echo"
+S["am__isrc"]=""
+S["INSTALL_DATA"]="${INSTALL} -m 644"
+S["INSTALL_SCRIPT"]="${INSTALL}"
+S["INSTALL_PROGRAM"]="${INSTALL}"
+S["target_os"]="linux-gnu"
+S["target_vendor"]="unknown"
+S["target_cpu"]="x86_64"
+S["target"]="x86_64-unknown-linux-gnu"
+S["host_os"]="linux-gnu"
+S["host_vendor"]="unknown"
+S["host_cpu"]="x86_64"
+S["host"]="x86_64-unknown-linux-gnu"
+S["build_os"]="linux-gnu"
+S["build_vendor"]="unknown"
+S["build_cpu"]="x86_64"
+S["build"]="x86_64-unknown-linux-gnu"
+S["target_alias"]=""
+S["host_alias"]=""
+S["build_alias"]=""
+S["LIBS"]="-lm "
+S["ECHO_T"]=""
+S["ECHO_N"]="-n"
+S["ECHO_C"]=""
+S["DEFS"]="-DHAVE_CONFIG_H"
+S["mandir"]="${datarootdir}/man"
+S["localedir"]="${datarootdir}/locale"
+S["libdir"]="${exec_prefix}/lib"
+S["psdir"]="${docdir}"
+S["pdfdir"]="${docdir}"
+S["dvidir"]="${docdir}"
+S["htmldir"]="${docdir}"
+S["infodir"]="${datarootdir}/info"
+S["docdir"]="${datarootdir}/doc/${PACKAGE_TARNAME}"
+S["oldincludedir"]="/usr/include"
+S["includedir"]="${prefix}/include"
+S["localstatedir"]="${prefix}/var"
+S["sharedstatedir"]="${prefix}/com"
+S["sysconfdir"]="${prefix}/etc"
+S["datadir"]="${datarootdir}"
+S["datarootdir"]="${prefix}/share"
+S["libexecdir"]="${exec_prefix}/libexec"
+S["sbindir"]="${exec_prefix}/sbin"
+S["bindir"]="${exec_prefix}/bin"
+S["program_transform_name"]="s,x,x,"
+S["prefix"]="/usr/local"
+S["exec_prefix"]="${prefix}"
+S["PACKAGE_URL"]=""
+S["PACKAGE_BUGREPORT"]="thierry.schuepbach at isb-sib.ch"
+S["PACKAGE_STRING"]="PfTools 3.0"
+S["PACKAGE_VERSION"]="3.0"
+S["PACKAGE_TARNAME"]="pftools"
+S["PACKAGE_NAME"]="PfTools"
+S["PATH_SEPARATOR"]=":"
+S["SHELL"]="/bin/bash"
+_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
+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
+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 {
+D["PACKAGE_NAME"]=" \"PfTools\""
+D["PACKAGE_TARNAME"]=" \"pftools\""
+D["PACKAGE_VERSION"]=" \"3.0\""
+D["PACKAGE_STRING"]=" \"PfTools 3.0\""
+D["PACKAGE_BUGREPORT"]=" \"thierry.schuepbach at isb-sib.ch\""
+D["PACKAGE_URL"]=" \"\""
+D["PACKAGE"]=" \"pftools\""
+D["VERSION"]=" \"3.0\""
+D["HAVE_LIBM"]=" 1"
+D["HAVE_ALLOCA_H"]=" 1"
+D["HAVE_ALLOCA"]=" 1"
+D["HAVE_FCNTL_H"]=" 1"
+D["HAVE_LIMITS_H"]=" 1"
+D["HAVE_STDLIB_H"]=" 1"
+D["HAVE_STRING_H"]=" 1"
+D["HAVE_SYS_TIME_H"]=" 1"
+D["HAVE_UNISTD_H"]=" 1"
+D["HAVE_INTTYPES_H"]=" 1"
+D["HAVE_MM_MALLOC_H"]=" 1"
+D["HAVE__BOOL"]=" 1"
+D["HAVE_STDBOOL_H"]=" 1"
+D["restrict"]=" __restrict"
+D["uid_t"]=" int"
+D["gid_t"]=" int"
+D["HAVE_STDLIB_H"]=" 1"
+D["HAVE_MALLOC"]=" 0"
+D["malloc"]=" rpl_malloc"
+D["HAVE_STDLIB_H"]=" 1"
+D["HAVE_UNISTD_H"]=" 1"
+D["HAVE_GETPAGESIZE"]=" 1"
+D["HAVE_SCHED_SETAFFINITY"]=" 1"
+D["HAVE_SCHED_GETAFFINITY"]=" 1"
+D["HAVE_CPU_SET_T"]=" 1"
+D["HAVE_CPU_SET_MACROS"]=" 1"
+D["HAVE_PTHREAD_AFFINITY_NP"]=" 1"
+D["HAVE_GETTIMEOFDAY"]=" 1"
+D["HAVE_MEMSET"]=" 1"
+D["HAVE_MUNMAP"]=" 1"
+D["HAVE_STRTOL"]=" 1"
+D["HAVE_MEMCPY"]=" 1"
+D["HAVE_FSEEK"]=" 1"
+D["HAVE_FTELL"]=" 1"
+  for (key in D) D_is_set[key] = 1
+  FS = ""
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+[_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ][_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]*([\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
+  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
+# 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;}
+  ac_datarootdir_hack='
+  s&@datadir@&${datarootdir}&g
+  s&@docdir@&${datarootdir}/doc/${PACKAGE_TARNAME}&g
+  s&@infodir@&${datarootdir}/info&g
+  s&@localedir@&${datarootdir}/locale&g
+  s&@mandir@&${datarootdir}/man&g
+  s&\${datarootdir}&${prefix}/share&g' ;;
+esac
+ac_sed_extra="/^[	 ]*VPATH[	 ]*=[	 ]*/{
+h
+s///
+s/^/:/
+s/[	 ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[	 ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[	 ]*$//
+}
+
+: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
diff --git a/config.sub b/config.sub
new file mode 100755
index 0000000..42adc67
--- /dev/null
+++ b/config.sub
@@ -0,0 +1,1791 @@
+#! /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, 2009, 2010,
+#   2011, 2012 Free Software Foundation, Inc.
+
+timestamp='2012-02-10'
+
+# 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, see <http://www.gnu.org/licenses/>.
+#
+# 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 GNU 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.
+
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+# 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, 2009, 2010, 2011, 2012
+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-android* | linux-dietlibc | linux-newlib* | \
+  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+  knetbsd*-gnu* | netbsd*-gnu* | \
+  kopensolaris*-gnu* | \
+  storm-chaos* | os2-emx* | rtmk-nova*)
+    os=-$maybe_os
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+    ;;
+  android-linux)
+    os=-linux-android
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+    ;;
+  *)
+    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 | -microblaze)
+		os=
+		basic_machine=$1
+		;;
+	-bluegene*)
+		os=-cnk
+		;;
+	-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 \
+	| aarch64 | aarch64_be \
+	| 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 \
+        | be32 | be64 \
+	| bfin \
+	| c4x | clipper \
+	| d10v | d30v | dlx | dsp16xx | dvp \
+	| epiphany \
+	| fido | fr30 | frv \
+	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+	| hexagon \
+	| i370 | i860 | i960 | ia64 \
+	| ip2k | iq2000 \
+	| le32 | le64 \
+	| lm32 \
+	| m32c | m32r | m32rle | m68000 | m68k | m88k \
+	| maxq | mb | microblaze | mcore | mep | metag \
+	| mips | mipsbe | mipseb | mipsel | mipsle \
+	| mips16 \
+	| mips64 | mips64el \
+	| mips64octeon | mips64octeonel \
+	| mips64orion | mips64orionel \
+	| mips64r5900 | mips64r5900el \
+	| mips64vr | mips64vrel \
+	| mips64vr4100 | mips64vr4100el \
+	| mips64vr4300 | mips64vr4300el \
+	| mips64vr5000 | mips64vr5000el \
+	| mips64vr5900 | mips64vr5900el \
+	| mipsisa32 | mipsisa32el \
+	| mipsisa32r2 | mipsisa32r2el \
+	| mipsisa64 | mipsisa64el \
+	| mipsisa64r2 | mipsisa64r2el \
+	| mipsisa64sb1 | mipsisa64sb1el \
+	| mipsisa64sr71k | mipsisa64sr71kel \
+	| mipstx39 | mipstx39el \
+	| mn10200 | mn10300 \
+	| moxie \
+	| mt \
+	| msp430 \
+	| nds32 | nds32le | nds32be \
+	| nios | nios2 \
+	| ns16k | ns32k \
+	| open8 \
+	| or32 \
+	| pdp10 | pdp11 | pj | pjl \
+	| powerpc | powerpc64 | powerpc64le | powerpcle \
+	| pyramid \
+	| rl78 | rx \
+	| score \
+	| sh | sh[1234] | sh[24]a | sh[24]aeb | 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 \
+	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+	| ubicom32 \
+	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+	| we32k \
+	| x86 | xc16x | xstormy16 | xtensa \
+	| z8k | z80)
+		basic_machine=$basic_machine-unknown
+		;;
+	c54x)
+		basic_machine=tic54x-unknown
+		;;
+	c55x)
+		basic_machine=tic55x-unknown
+		;;
+	c6x)
+		basic_machine=tic6x-unknown
+		;;
+	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
+		basic_machine=$basic_machine-unknown
+		os=-none
+		;;
+	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+		;;
+	ms1)
+		basic_machine=mt-unknown
+		;;
+
+	strongarm | thumb | xscale)
+		basic_machine=arm-unknown
+		;;
+	xgate)
+		basic_machine=$basic_machine-unknown
+		os=-none
+		;;
+	xscaleeb)
+		basic_machine=armeb-unknown
+		;;
+
+	xscaleel)
+		basic_machine=armel-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-* \
+	| aarch64-* | aarch64_be-* \
+	| 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-* \
+	| be32-* | be64-* \
+	| bfin-* | bs2000-* \
+	| c[123]* | c30-* | [cjt]90-* | c4x-* \
+	| 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-* \
+	| hexagon-* \
+	| i*86-* | i860-* | i960-* | ia64-* \
+	| ip2k-* | iq2000-* \
+	| le32-* | le64-* \
+	| lm32-* \
+	| m32c-* | m32r-* | m32rle-* \
+	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
+	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+	| mips16-* \
+	| mips64-* | mips64el-* \
+	| mips64octeon-* | mips64octeonel-* \
+	| mips64orion-* | mips64orionel-* \
+	| mips64r5900-* | mips64r5900el-* \
+	| mips64vr-* | mips64vrel-* \
+	| 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-* \
+	| nds32-* | nds32le-* | nds32be-* \
+	| nios-* | nios2-* \
+	| none-* | np1-* | ns16k-* | ns32k-* \
+	| open8-* \
+	| orion-* \
+	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+	| pyramid-* \
+	| rl78-* | romp-* | rs6000-* | rx-* \
+	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | 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-* | sv1-* | sx?-* \
+	| tahoe-* \
+	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+	| tile*-* \
+	| tron-* \
+	| ubicom32-* \
+	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+	| vax-* \
+	| we32k-* \
+	| x86-* | x86_64-* | xc16x-* | xps100-* \
+	| xstormy16-* | xtensa*-* \
+	| ymp-* \
+	| z8k-* | z80-*)
+		;;
+	# 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
+		;;
+	aros)
+		basic_machine=i386-pc
+		os=-aros
+		;;
+	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
+		;;
+	bluegene*)
+		basic_machine=powerpc-ibm
+		os=-cnk
+		;;
+	c54x-*)
+		basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	c55x-*)
+		basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	c6x-*)
+		basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	c90)
+		basic_machine=c90-cray
+		os=-unicos
+		;;
+	cegcc)
+		basic_machine=arm-unknown
+		os=-cegcc
+		;;
+	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 | 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
+		;;
+	dicos)
+		basic_machine=i686-pc
+		os=-dicos
+		;;
+	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*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
+		;;
+	microblaze)
+		basic_machine=microblaze-xilinx
+		;;
+	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
+		;;
+	mipsEE* | ee | ps2)
+		basic_machine=mips64r5900el-scei
+		case $os in
+		    -linux*)
+			;;
+		    *)
+			os=-elf
+			;;
+		esac
+		;;
+	iop)
+		basic_machine=mipsel-scei
+		os=-irx
+		;;
+	dvp)
+		basic_machine=dvp-scei
+		os=-elf
+		;;
+	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-/'`
+		;;
+	msys)
+		basic_machine=i386-pc
+		os=-msys
+		;;
+	mvs)
+		basic_machine=i370-ibm
+		os=-mvs
+		;;
+	nacl)
+		basic_machine=le32-unknown
+		os=-nacl
+		;;
+	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
+		;;
+	neo-tandem)
+		basic_machine=neo-tandem
+		;;
+	nse-tandem)
+		basic_machine=nse-tandem
+		;;
+	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 | ppcbe)	basic_machine=powerpc-unknown
+		;;
+	ppc-* | ppcbe-*)
+		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
+		;;
+	strongarm-* | thumb-*)
+		basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	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
+		;;
+	tile*)
+		basic_machine=$basic_machine-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
+		;;
+	xscale-* | xscalee[bl]-*)
+		basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+		;;
+	ymp)
+		basic_machine=ymp-cray
+		os=-unicos
+		;;
+	z8k-*-coff)
+		basic_machine=z8k-unknown
+		os=-sim
+		;;
+	z80-*-coff)
+		basic_machine=z80-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[24]aeb | 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.
+	-auroraux)
+		os=-auroraux
+		;;
+	-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* | -cnk* | -sunos | -sunos[34]*\
+	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+	      | -sym* | -kopensolaris* \
+	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+	      | -aos* | -aros* \
+	      | -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* | -cegcc* \
+	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+	      | -mingw32* | -linux-gnu* | -linux-android* \
+	      | -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* | -irx* \
+	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+	# 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
+		;;
+	-dicos*)
+		os=-dicos
+		;;
+	-nacl*)
+		;;
+	-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
+		;;
+	tic54x-*)
+		os=-coff
+		;;
+	tic55x-*)
+		os=-coff
+		;;
+	tic6x-*)
+		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
+		;;
+	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
+				;;
+			-cnk*|-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/configure b/configure
new file mode 100755
index 0000000..653d4d5
--- /dev/null
+++ b/configure
@@ -0,0 +1,7939 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.68 for PfTools 3.0.
+#
+# Report bugs to <thierry.schuepbach at isb-sib.ch>.
+#
+#
+# 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
+$0: thierry.schuepbach at isb-sib.ch about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if 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='PfTools'
+PACKAGE_TARNAME='pftools'
+PACKAGE_VERSION='3.0'
+PACKAGE_STRING='PfTools 3.0'
+PACKAGE_BUGREPORT='thierry.schuepbach at isb-sib.ch'
+PACKAGE_URL=''
+
+# 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_header_list=
+ac_subst_vars='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
+USE_AFFINITY
+USE_MMAP
+LIBOBJS
+FPP_OPTION
+PTHREAD_CFLAGS
+PTHREAD_LIBS
+PTHREAD_CC
+ax_pthread_config
+SIMD_SSE4_1_CFLAGS
+SIMD_SSE2_CFLAGS
+ALLOCA
+INTEL_IMF
+EGREP
+GREP
+CPP
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+ac_ct_CC
+CPPFLAGS
+CFLAGS
+CC
+OBJEXT
+EXEEXT
+ac_ct_F77
+LDFLAGS
+FFLAGS
+F77
+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
+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_mmap
+enable_thread_affinity
+'
+      ac_precious_vars='build_alias
+host_alias
+target_alias
+F77
+FFLAGS
+LDFLAGS
+LIBS
+CC
+CFLAGS
+CPPFLAGS
+CPP'
+
+
+# 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 PfTools 3.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/pftools]
+  --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 PfTools 3.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-mmap           use memory mapping of files rather than libc fopen,
+                          default is yes
+  --enable-thread-affinity
+                          Enforce affinity on threads, default is yes
+
+Some influential environment variables:
+  F77         Fortran 77 compiler command
+  FFLAGS      Fortran 77 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>
+  CC          C compiler command
+  CFLAGS      C compiler flags
+  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
+              you have headers in a nonstandard directory <include dir>
+  CPP         C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to <thierry.schuepbach at isb-sib.ch>.
+_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
+PfTools configure 3.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.
+_ACEOF
+  exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_f77_try_compile LINENO
+# ----------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_f77_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_f77_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_f77_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 thierry.schuepbach at isb-sib.ch ##
+## -------------------------------------------- ##"
+     ) | 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_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
+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 PfTools $as_me 3.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
+
+as_fn_append ac_header_list " stdlib.h"
+as_fn_append ac_header_list " unistd.h"
+as_fn_append ac_header_list " sys/param.h"
+# 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
+
+
+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}: Configuring PfTools for your system." >&5
+$as_echo "$as_me: Configuring PfTools for your system." >&6;}
+ac_aux_dir=
+for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
+  if test -f "$ac_dir/install-sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f "$ac_dir/install.sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f "$ac_dir/shtool"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$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.
+
+
+# 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
+
+
+{ $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
+
+
+{ $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}-
+
+ac_config_headers="$ac_config_headers src/C/include/config.h"
+
+
+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='pftools'
+ VERSION='3.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.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
+
+
+
+
+PfTools_DATE="November 2012"
+PfTools_COPYRIGHT="Copyright (C) 2012 Swiss Institute of Bioinformatics."
+PfTools_LICENSE="Freely distributed under the GNU General Public License (GPLv3)."
+PfTools_VERSION=$PACKAGE_VERSION
+PfTools_URL="http://www.isb-sib.ch/"
+
+#-------------------------------------------------------------------------------------------------------
+# Checks for programs.
+#-------------------------------------------------------------------------------------------------------
+ac_ext=f
+ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
+ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_f77_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn
+  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_F77+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$F77"; then
+  ac_cv_prog_F77="$F77" # 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_F77="$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
+F77=$ac_cv_prog_F77
+if test -n "$F77"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $F77" >&5
+$as_echo "$F77" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$F77" && break
+  done
+fi
+if test -z "$F77"; then
+  ac_ct_F77=$F77
+  for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn
+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_F77+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_F77"; then
+  ac_cv_prog_ac_ct_F77="$ac_ct_F77" # 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_F77="$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_F77=$ac_cv_prog_ac_ct_F77
+if test -n "$ac_ct_F77"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_F77" >&5
+$as_echo "$ac_ct_F77" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_F77" && break
+done
+
+  if test "x$ac_ct_F77" = x; then
+    F77=""
+  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
+    F77=$ac_ct_F77
+  fi
+fi
+
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 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
+rm -f a.out
+
+cat > conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_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 Fortran 77 compiler works" >&5
+$as_echo_n "checking whether the Fortran 77 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 "Fortran 77 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 Fortran 77 compiler default output file name" >&5
+$as_echo_n "checking for Fortran 77 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 > conftest.$ac_ext <<_ACEOF
+      program main
+      open(unit=9,file='conftest.out')
+      close(unit=9)
+
+      end
+_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 Fortran 77 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 > conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_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
+# If we don't use `.F' as extension, the preprocessor is not run on the
+# input file.  (Note that this only needs to work for GNU compilers.)
+ac_save_ext=$ac_ext
+ac_ext=F
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran 77 compiler" >&5
+$as_echo_n "checking whether we are using the GNU Fortran 77 compiler... " >&6; }
+if ${ac_cv_f77_compiler_gnu+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat > conftest.$ac_ext <<_ACEOF
+      program main
+#ifndef __GNUC__
+       choke me
+#endif
+
+      end
+_ACEOF
+if ac_fn_f77_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_f77_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_compiler_gnu" >&5
+$as_echo "$ac_cv_f77_compiler_gnu" >&6; }
+ac_ext=$ac_save_ext
+ac_test_FFLAGS=${FFLAGS+set}
+ac_save_FFLAGS=$FFLAGS
+FFLAGS=
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $F77 accepts -g" >&5
+$as_echo_n "checking whether $F77 accepts -g... " >&6; }
+if ${ac_cv_prog_f77_g+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  FFLAGS=-g
+cat > conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+if ac_fn_f77_try_compile "$LINENO"; then :
+  ac_cv_prog_f77_g=yes
+else
+  ac_cv_prog_f77_g=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_g" >&5
+$as_echo "$ac_cv_prog_f77_g" >&6; }
+if test "$ac_test_FFLAGS" = set; then
+  FFLAGS=$ac_save_FFLAGS
+elif test $ac_cv_prog_f77_g = yes; then
+  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
+    FFLAGS="-g -O2"
+  else
+    FFLAGS="-g"
+  fi
+else
+  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
+    FFLAGS="-O2"
+  else
+    FFLAGS=
+  fi
+fi
+
+if test $ac_compiler_gnu = yes; then
+  G77=yes
+else
+  G77=
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ac_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
+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='\'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+  AMDEP_TRUE=
+  AMDEP_FALSE='#'
+else
+  AMDEP_TRUE='#'
+  AMDEP_FALSE=
+fi
+
+
+
+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'.
+  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
+      ;;
+    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
+
+
+if test "x$CC" != xcc; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
+$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
+$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
+fi
+set dummy $CC; ac_cc=`$as_echo "$2" |
+		      sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+# Make sure it works both with $CC and with simple cc.
+# We do the test twice because some compilers refuse to overwrite an
+# existing .o file with -o, though they will create one.
+ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+rm -f conftest2.*
+if { { 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; } &&
+   test -f conftest2.$ac_objext && { { 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
+  eval ac_cv_prog_cc_${ac_cc}_c_o=yes
+  if test "x$CC" != xcc; then
+    # Test first that cc exists at all.
+    if { ac_try='cc -c conftest.$ac_ext >&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_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then
+      ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+      rm -f conftest2.*
+      if { { 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; } &&
+	 test -f conftest2.$ac_objext && { { 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
+	# cc works too.
+	:
+      else
+	# cc exists but doesn't like -o.
+	eval ac_cv_prog_cc_${ac_cc}_c_o=no
+      fi
+    fi
+  fi
+else
+  eval ac_cv_prog_cc_${ac_cc}_c_o=no
+fi
+rm -f core conftest*
+
+fi
+if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; 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; }
+
+$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
+
+fi
+
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
+if test "$am_t" != yes; then
+   # Losing compiler, so override with the script.
+   # FIXME: It is wrong to rewrite CC.
+   # But if we don't then we get into trouble of one sort or another.
+   # A longer-term fix would be to have automake use am__CC in this case,
+   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+   CC="$am_aux_dir/compile $CC"
+fi
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler vendor" >&5
+$as_echo_n "checking for C compiler vendor... " >&6; }
+if ${ax_cv_c_compiler_vendor+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  # note: don't check for gcc first since some other compilers define __GNUC__
+  vendors="intel:     __ICC,__ECC,__INTEL_COMPILER
+           ibm:       __xlc__,__xlC__,__IBMC__,__IBMCPP__
+           pathscale: __PATHCC__,__PATHSCALE__
+           clang:     __clang__
+           gnu:       __GNUC__
+           sun:       __SUNPRO_C,__SUNPRO_CC
+           hp:        __HP_cc,__HP_aCC
+           dec:       __DECC,__DECCXX,__DECC_VER,__DECCXX_VER
+           borland:   __BORLANDC__,__TURBOC__
+           comeau:    __COMO__
+           cray:      _CRAYC
+           kai:       __KCC
+           lcc:       __LCC__
+           sgi:       __sgi,sgi
+           microsoft: _MSC_VER
+           metrowerks: __MWERKS__
+           watcom:    __WATCOMC__
+           portland:  __PGI
+           unknown:   UNKNOWN"
+  for ventest in $vendors; do
+    case $ventest in
+      *:) vendor=$ventest; continue ;;
+      *)  vencpp="defined("`echo $ventest | sed 's/,/) || defined(/g'`")" ;;
+    esac
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+      #if !($vencpp)
+        thisisanerror;
+      #endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+  ax_cv_c_compiler_vendor=`echo $vendor | cut -d: -f1`
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_compiler_vendor" >&5
+$as_echo "$ax_cv_c_compiler_vendor" >&6; }
+
+
+#-------------------------------------------------------------------------------------------------------
+# Checks for target system
+#-------------------------------------------------------------------------------------------------------
+if test $target_cpu != "x86_64" ; then
+  as_fn_error $? "Currently pftools only runs on 64 bit architectures." "$LINENO" 5
+fi
+
+#-------------------------------------------------------------------------------------------------------
+# Add features.
+#-------------------------------------------------------------------------------------------------------
+# Check whether --enable-mmap was given.
+if test "${enable_mmap+set}" = set; then :
+  enableval=$enable_mmap; enable_mmap=$enableval
+else
+  enable_mmap=yes
+fi
+
+# Check whether --enable-thread-affinity was given.
+if test "${enable_thread_affinity+set}" = set; then :
+  enableval=$enable_thread_affinity; enable_thread_affinity=$enableval
+else
+  enable_thread_affinity=yes
+fi
+
+
+#-------------------------------------------------------------------------------------------------------
+# Checks for libraries.
+#-------------------------------------------------------------------------------------------------------
+if test $ax_cv_c_compiler_vendor = "intel"; then
+  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
+
+
+for ac_header in mathimf.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "mathimf.h" "ac_cv_header_mathimf_h" "$ac_includes_default"
+if test "x$ac_cv_header_mathimf_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_MATHIMF_H 1
+_ACEOF
+
+fi
+
+done
+
+  INTEL_IMF=-limf
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: Intel IMF library will be used" >&5
+$as_echo "$as_me: Intel IMF library will be used" >&6;}
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for expf in -lm" >&5
+$as_echo_n "checking for expf in -lm... " >&6; }
+if ${ac_cv_lib_m_expf+:} 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 expf ();
+int
+main ()
+{
+return expf ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_m_expf=yes
+else
+  ac_cv_lib_m_expf=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_expf" >&5
+$as_echo "$ac_cv_lib_m_expf" >&6; }
+if test "x$ac_cv_lib_m_expf" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+  LIBS="-lm $LIBS"
+
+fi
+
+
+#-------------------------------------------------------------------------------------------------------
+# Checks for header files.
+#-------------------------------------------------------------------------------------------------------
+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
+
+# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+# for constant arguments.  Useless!
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
+$as_echo_n "checking for working alloca.h... " >&6; }
+if ${ac_cv_working_alloca_h+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <alloca.h>
+int
+main ()
+{
+char *p = (char *) alloca (2 * sizeof (int));
+			  if (p) return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_working_alloca_h=yes
+else
+  ac_cv_working_alloca_h=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_working_alloca_h" >&5
+$as_echo "$ac_cv_working_alloca_h" >&6; }
+if test $ac_cv_working_alloca_h = yes; then
+
+$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
+$as_echo_n "checking for alloca... " >&6; }
+if ${ac_cv_func_alloca_works+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+#else
+# ifdef _MSC_VER
+#  include <malloc.h>
+#  define alloca _alloca
+# else
+#  ifdef HAVE_ALLOCA_H
+#   include <alloca.h>
+#  else
+#   ifdef _AIX
+ #pragma alloca
+#   else
+#    ifndef alloca /* predefined by HP cc +Olibcalls */
+void *alloca (size_t);
+#    endif
+#   endif
+#  endif
+# endif
+#endif
+
+int
+main ()
+{
+char *p = (char *) alloca (1);
+				    if (p) return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_func_alloca_works=yes
+else
+  ac_cv_func_alloca_works=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_func_alloca_works" >&5
+$as_echo "$ac_cv_func_alloca_works" >&6; }
+
+if test $ac_cv_func_alloca_works = yes; then
+
+$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
+
+else
+  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
+# that cause trouble.  Some versions do not even contain alloca or
+# contain a buggy version.  If you still want to use their alloca,
+# use ar to extract alloca.o from them instead of compiling alloca.c.
+
+ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
+
+$as_echo "#define C_ALLOCA 1" >>confdefs.h
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
+$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
+if ${ac_cv_os_cray+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#if defined CRAY && ! defined CRAY2
+webecray
+#else
+wenotbecray
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "webecray" >/dev/null 2>&1; then :
+  ac_cv_os_cray=yes
+else
+  ac_cv_os_cray=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
+$as_echo "$ac_cv_os_cray" >&6; }
+if test $ac_cv_os_cray = yes; then
+  for ac_func in _getb67 GETB67 getb67; 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 CRAY_STACKSEG_END $ac_func
+_ACEOF
+
+    break
+fi
+
+  done
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
+$as_echo_n "checking stack direction for C alloca... " >&6; }
+if ${ac_cv_c_stack_direction+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  ac_cv_c_stack_direction=0
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+int
+find_stack_direction ()
+{
+  static char *addr = 0;
+  auto char dummy;
+  if (addr == 0)
+    {
+      addr = &dummy;
+      return find_stack_direction ();
+    }
+  else
+    return (&dummy > addr) ? 1 : -1;
+}
+
+int
+main ()
+{
+  return find_stack_direction () < 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_c_stack_direction=1
+else
+  ac_cv_c_stack_direction=-1
+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_c_stack_direction" >&5
+$as_echo "$ac_cv_c_stack_direction" >&6; }
+cat >>confdefs.h <<_ACEOF
+#define STACK_DIRECTION $ac_cv_c_stack_direction
+_ACEOF
+
+
+fi
+
+for ac_header in fcntl.h limits.h stdlib.h string.h sys/time.h unistd.h inttypes.h mm_malloc.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 $CC option to accept ISO C99" >&5
+$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
+if ${ac_cv_prog_cc_c99+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <wchar.h>
+#include <stdio.h>
+
+// Check varargs macros.  These examples are taken from C99 6.10.3.5.
+#define debug(...) fprintf (stderr, __VA_ARGS__)
+#define showlist(...) puts (#__VA_ARGS__)
+#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
+static void
+test_varargs_macros (void)
+{
+  int x = 1234;
+  int y = 5678;
+  debug ("Flag");
+  debug ("X = %d\n", x);
+  showlist (The first, second, and third items.);
+  report (x>y, "x is %d but y is %d", x, y);
+}
+
+// Check long long types.
+#define BIG64 18446744073709551615ull
+#define BIG32 4294967295ul
+#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
+#if !BIG_OK
+  your preprocessor is broken;
+#endif
+#if BIG_OK
+#else
+  your preprocessor is broken;
+#endif
+static long long int bignum = -9223372036854775807LL;
+static unsigned long long int ubignum = BIG64;
+
+struct incomplete_array
+{
+  int datasize;
+  double data[];
+};
+
+struct named_init {
+  int number;
+  const wchar_t *name;
+  double average;
+};
+
+typedef const char *ccp;
+
+static inline int
+test_restrict (ccp restrict text)
+{
+  // See if C++-style comments work.
+  // Iterate through items via the restricted pointer.
+  // Also check for declarations in for loops.
+  for (unsigned int i = 0; *(text+i) != '\0'; ++i)
+    continue;
+  return 0;
+}
+
+// Check varargs and va_copy.
+static void
+test_varargs (const char *format, ...)
+{
+  va_list args;
+  va_start (args, format);
+  va_list args_copy;
+  va_copy (args_copy, args);
+
+  const char *str;
+  int number;
+  float fnumber;
+
+  while (*format)
+    {
+      switch (*format++)
+	{
+	case 's': // string
+	  str = va_arg (args_copy, const char *);
+	  break;
+	case 'd': // int
+	  number = va_arg (args_copy, int);
+	  break;
+	case 'f': // float
+	  fnumber = va_arg (args_copy, double);
+	  break;
+	default:
+	  break;
+	}
+    }
+  va_end (args_copy);
+  va_end (args);
+}
+
+int
+main ()
+{
+
+  // Check bool.
+  _Bool success = false;
+
+  // Check restrict.
+  if (test_restrict ("String literal") == 0)
+    success = true;
+  char *restrict newvar = "Another string";
+
+  // Check varargs.
+  test_varargs ("s, d' f .", "string", 65, 34.234);
+  test_varargs_macros ();
+
+  // Check flexible array members.
+  struct incomplete_array *ia =
+    malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
+  ia->datasize = 10;
+  for (int i = 0; i < ia->datasize; ++i)
+    ia->data[i] = i * 1.234;
+
+  // Check named initializers.
+  struct named_init ni = {
+    .number = 34,
+    .name = L"Test wide string",
+    .average = 543.34343,
+  };
+
+  ni.number = 58;
+
+  int dynamic_array[ni.number];
+  dynamic_array[ni.number - 1] = 543;
+
+  // work around unused variable warnings
+  return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
+	  || dynamic_array[ni.number - 1] != 543);
+
+  ;
+  return 0;
+}
+_ACEOF
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
+do
+  CC="$ac_save_CC $ac_arg"
+  if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_c99=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+  test "x$ac_cv_prog_cc_c99" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c99" 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_c99"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c99" != xno; then :
+
+fi
+
+
+if test "$ac_cv_prog_cc_c99" = "no"; then
+  as_fn_error $? "PfTools $PACKAGE_VERSION require a C compiler supporting C99 mode." "$LINENO" 5
+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
+
+{ $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
+
+{ $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 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" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
+if test "x$ac_cv_type_off_t" = xyes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define off_t long int
+_ACEOF
+
+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
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
+$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
+if ${ac_cv_type_uid_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "uid_t" >/dev/null 2>&1; then :
+  ac_cv_type_uid_t=yes
+else
+  ac_cv_type_uid_t=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
+$as_echo "$ac_cv_type_uid_t" >&6; }
+if test $ac_cv_type_uid_t = no; then
+
+$as_echo "#define uid_t int" >>confdefs.h
+
+
+$as_echo "#define gid_t int" >>confdefs.h
+
+fi
+
+#AC_SYS_LARGEFILE
+
+#AC_HEADER_TIME
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -msse2" >&5
+$as_echo_n "checking whether C compiler accepts -msse2... " >&6; }
+if ${ax_cv_check_cflags___msse2+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+  ax_check_save_flags=$CFLAGS
+  CFLAGS="$CFLAGS  -msse2"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ax_cv_check_cflags___msse2=yes
+else
+  ax_cv_check_cflags___msse2=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  CFLAGS=$ax_check_save_flags
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___msse2" >&5
+$as_echo "$ax_cv_check_cflags___msse2" >&6; }
+if test x"$ax_cv_check_cflags___msse2" = xyes; then :
+  SIMD_SSE2_CFLAGS="-msse2"
+else
+  SIMD_SSE2_CFLAGS=""
+fi
+
+if test $SIMD_SSE2_CFLAGS != "-msse2"; then
+  as_fn_error $? "Compiler cannot generate SSE 2 code" "$LINENO" 5
+#else
+#  AC_CHECK_HEADERS([emmintrin.h],[], [AC_MSG_ERROR([Missing SSE 2 header file emmintrin.h])])
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -msse4.1" >&5
+$as_echo_n "checking whether C compiler accepts -msse4.1... " >&6; }
+if ${ax_cv_check_cflags___msse4_1+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+  ax_check_save_flags=$CFLAGS
+  CFLAGS="$CFLAGS  -msse4.1"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ax_cv_check_cflags___msse4_1=yes
+else
+  ax_cv_check_cflags___msse4_1=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  CFLAGS=$ax_check_save_flags
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___msse4_1" >&5
+$as_echo "$ax_cv_check_cflags___msse4_1" >&6; }
+if test x"$ax_cv_check_cflags___msse4_1" = xyes; then :
+  SIMD_SSE4_1_CFLAGS="-msse4.1"
+else
+  SIMD_SSE4_1_CFLAGS=""
+fi
+
+if test $SIMD_SSE4_1_CFLAGS != "-msse4.1"; then
+  as_fn_error $? "Compiler cannot generate SSE 4.1 code" "$LINENO" 5
+#else
+#  AC_CHECK_HEADERS([smmintrin.h],[], [AC_MSG_ERROR([Missing SSE 4.1 header file smmintrin.h])])
+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
+
+ax_pthread_ok=no
+
+# We used to check for pthread.h first, but this fails if pthread.h
+# requires special compiler flags (e.g. on True64 or Sequent).
+# It gets checked for in the link test anyway.
+
+# First of all, check if the user has set any of the PTHREAD_LIBS,
+# etcetera environment variables, and if threads linking works using
+# them:
+if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
+        save_CFLAGS="$CFLAGS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+        save_LIBS="$LIBS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
+$as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
+        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 pthread_join ();
+int
+main ()
+{
+return pthread_join ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ax_pthread_ok=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
+$as_echo "$ax_pthread_ok" >&6; }
+        if test x"$ax_pthread_ok" = xno; then
+                PTHREAD_LIBS=""
+                PTHREAD_CFLAGS=""
+        fi
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+fi
+
+# We must check for the threads library under a number of different
+# names; the ordering is very important because some systems
+# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
+# libraries is broken (non-POSIX).
+
+# Create a list of thread flags to try.  Items starting with a "-" are
+# C compiler flags, and other items are library names, except for "none"
+# which indicates that we try without any flags at all, and "pthread-config"
+# which is a program returning the flags for the Pth emulation library.
+
+ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
+
+# The ordering *is* (sometimes) important.  Some notes on the
+# individual items follow:
+
+# pthreads: AIX (must check this before -lpthread)
+# none: in case threads are in libc; should be tried before -Kthread and
+#       other compiler flags to prevent continual compiler warnings
+# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
+# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
+# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
+# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
+# -pthreads: Solaris/gcc
+# -mthreads: Mingw32/gcc, Lynx/gcc
+# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
+#      doesn't hurt to check since this sometimes defines pthreads too;
+#      also defines -D_REENTRANT)
+#      ... -mt is also the pthreads flag for HP/aCC
+# pthread: Linux, etcetera
+# --thread-safe: KAI C++
+# pthread-config: use pthread-config program (for GNU Pth library)
+
+case ${host_os} in
+        solaris*)
+
+        # On Solaris (at least, for some versions), libc contains stubbed
+        # (non-functional) versions of the pthreads routines, so link-based
+        # tests will erroneously succeed.  (We need to link with -pthreads/-mt/
+        # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
+        # a function called by this macro, so we could check for that, but
+        # who knows whether they'll stub that too in a future libc.)  So,
+        # we'll just look for -pthreads and -lpthread first:
+
+        ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags"
+        ;;
+
+        darwin*)
+        ax_pthread_flags="-pthread $ax_pthread_flags"
+        ;;
+esac
+
+if test x"$ax_pthread_ok" = xno; then
+for flag in $ax_pthread_flags; do
+
+        case $flag in
+                none)
+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
+$as_echo_n "checking whether pthreads work without any flags... " >&6; }
+                ;;
+
+                -*)
+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5
+$as_echo_n "checking whether pthreads work with $flag... " >&6; }
+                PTHREAD_CFLAGS="$flag"
+                ;;
+
+                pthread-config)
+                # Extract the first word of "pthread-config", so it can be a program name with args.
+set dummy pthread-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_prog_ax_pthread_config+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ax_pthread_config"; then
+  ac_cv_prog_ax_pthread_config="$ax_pthread_config" # 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_ax_pthread_config="yes"
+    $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_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
+fi
+fi
+ax_pthread_config=$ac_cv_prog_ax_pthread_config
+if test -n "$ax_pthread_config"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
+$as_echo "$ax_pthread_config" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+                if test x"$ax_pthread_config" = xno; then continue; fi
+                PTHREAD_CFLAGS="`pthread-config --cflags`"
+                PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
+                ;;
+
+                *)
+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5
+$as_echo_n "checking for the pthreads library -l$flag... " >&6; }
+                PTHREAD_LIBS="-l$flag"
+                ;;
+        esac
+
+        save_LIBS="$LIBS"
+        save_CFLAGS="$CFLAGS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+        # Check for various functions.  We must include pthread.h,
+        # since some functions may be macros.  (On the Sequent, we
+        # need a special flag -Kthread to make this header compile.)
+        # We check for pthread_join because it is in -lpthread on IRIX
+        # while pthread_create is in libc.  We check for pthread_attr_init
+        # due to DEC craziness with -lpthreads.  We check for
+        # pthread_cleanup_push because it is one of the few pthread
+        # functions on Solaris that doesn't have a non-functional libc stub.
+        # We try pthread_create on general principles.
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <pthread.h>
+                        static void routine(void *a) { a = 0; }
+                        static void *start_routine(void *a) { return a; }
+int
+main ()
+{
+pthread_t th; pthread_attr_t attr;
+                        pthread_create(&th, 0, start_routine, 0);
+                        pthread_join(th, 0);
+                        pthread_attr_init(&attr);
+                        pthread_cleanup_push(routine, 0);
+                        pthread_cleanup_pop(0) /* ; */
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ax_pthread_ok=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
+$as_echo "$ax_pthread_ok" >&6; }
+        if test "x$ax_pthread_ok" = xyes; then
+                break;
+        fi
+
+        PTHREAD_LIBS=""
+        PTHREAD_CFLAGS=""
+done
+fi
+
+# Various other checks:
+if test "x$ax_pthread_ok" = xyes; then
+        save_LIBS="$LIBS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        save_CFLAGS="$CFLAGS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+        # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
+$as_echo_n "checking for joinable pthread attribute... " >&6; }
+        attr_name=unknown
+        for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
+            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <pthread.h>
+int
+main ()
+{
+int attr = $attr; return attr /* ; */
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  attr_name=$attr; break
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+        done
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5
+$as_echo "$attr_name" >&6; }
+        if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
+
+cat >>confdefs.h <<_ACEOF
+#define PTHREAD_CREATE_JOINABLE $attr_name
+_ACEOF
+
+        fi
+
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
+$as_echo_n "checking if more special flags are required for pthreads... " >&6; }
+        flag=no
+        case ${host_os} in
+            aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";;
+            osf* | hpux*) flag="-D_REENTRANT";;
+            solaris*)
+            if test "$GCC" = "yes"; then
+                flag="-D_REENTRANT"
+            else
+                flag="-mt -D_REENTRANT"
+            fi
+            ;;
+        esac
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5
+$as_echo "${flag}" >&6; }
+        if test "x$flag" != xno; then
+            PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
+        fi
+
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
+$as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
+if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+                    #include <pthread.h>
+int
+main ()
+{
+int i = PTHREAD_PRIO_INHERIT;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ax_cv_PTHREAD_PRIO_INHERIT=yes
+else
+  ax_cv_PTHREAD_PRIO_INHERIT=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: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
+$as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
+        if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"; then :
+
+$as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
+
+fi
+
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+
+        # More AIX lossage: must compile with xlc_r or cc_r
+        if test x"$GCC" != xyes; then
+          for ac_prog in xlc_r cc_r
+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_PTHREAD_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$PTHREAD_CC"; then
+  ac_cv_prog_PTHREAD_CC="$PTHREAD_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_PTHREAD_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
+PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
+if test -n "$PTHREAD_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
+$as_echo "$PTHREAD_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$PTHREAD_CC" && break
+done
+test -n "$PTHREAD_CC" || PTHREAD_CC="${CC}"
+
+        else
+          PTHREAD_CC=$CC
+        fi
+else
+        PTHREAD_CC="$CC"
+fi
+
+
+
+
+
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+if test x"$ax_pthread_ok" = xyes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: Posix thread found." >&5
+$as_echo "$as_me: Posix thread found." >&6;}
+
+
+        :
+else
+        ax_pthread_ok=no
+        as_fn_error $? "Posix thread not found." "$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
+
+
+
+# get the fortran preprocessor option
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $F77 option to accept preprocessor commands" >&5
+$as_echo_n "checking for $F77 option to accept preprocessor commands... " >&6; }
+case $F77 in
+  gfortran) FPP_OPTION=-cpp
+
+	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FPP_OPTION" >&5
+$as_echo "$FPP_OPTION" >&6; };;
+  g77)      FPP_OPTION=-cpp
+
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FPP_OPTION" >&5
+$as_echo "$FPP_OPTION" >&6; };;
+  ifort)    FPP_OPTION=-fpp
+
+            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FPP_OPTION" >&5
+$as_echo "$FPP_OPTION" >&6; };;
+  *)	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
+$as_echo "unknown" >&6; }
+            { $as_echo "$as_me:${as_lineno-$LINENO}: You may encounter preprocessor statement warnings." >&5
+$as_echo "$as_me: You may encounter preprocessor statement warnings." >&6;}
+esac
+#-------------------------------------------------------------------------------------------------------
+# Checks for library functions.
+#-------------------------------------------------------------------------------------------------------
+for ac_header in stdlib.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdlib_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_STDLIB_H 1
+_ACEOF
+
+fi
+
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
+$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
+if ${ac_cv_func_malloc_0_nonnull+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  ac_cv_func_malloc_0_nonnull=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#if defined STDC_HEADERS || defined HAVE_STDLIB_H
+# include <stdlib.h>
+#else
+char *malloc ();
+#endif
+
+int
+main ()
+{
+return ! malloc (0);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_func_malloc_0_nonnull=yes
+else
+  ac_cv_func_malloc_0_nonnull=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_malloc_0_nonnull" >&5
+$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
+if test $ac_cv_func_malloc_0_nonnull = yes; then :
+
+$as_echo "#define HAVE_MALLOC 1" >>confdefs.h
+
+else
+  $as_echo "#define HAVE_MALLOC 0" >>confdefs.h
+
+   case " $LIBOBJS " in
+  *" malloc.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
+ ;;
+esac
+
+
+$as_echo "#define malloc rpl_malloc" >>confdefs.h
+
+fi
+
+
+
+if test $enable_mmap = "yes"; then
+
+
+
+  for ac_header in $ac_header_list
+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
+
+
+
+
+
+
+
+
+for ac_func in getpagesize
+do :
+  ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
+if test "x$ac_cv_func_getpagesize" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_GETPAGESIZE 1
+_ACEOF
+
+fi
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
+$as_echo_n "checking for working mmap... " >&6; }
+if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  ac_cv_func_mmap_fixed_mapped=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+/* malloc might have been renamed as rpl_malloc. */
+#undef malloc
+
+/* Thanks to Mike Haertel and Jim Avera for this test.
+   Here is a matrix of mmap possibilities:
+	mmap private not fixed
+	mmap private fixed at somewhere currently unmapped
+	mmap private fixed at somewhere already mapped
+	mmap shared not fixed
+	mmap shared fixed at somewhere currently unmapped
+	mmap shared fixed at somewhere already mapped
+   For private mappings, we should verify that changes cannot be read()
+   back from the file, nor mmap's back from the file at a different
+   address.  (There have been systems where private was not correctly
+   implemented like the infamous i386 svr4.0, and systems where the
+   VM page cache was not coherent with the file system buffer cache
+   like early versions of FreeBSD and possibly contemporary NetBSD.)
+   For shared mappings, we should conversely verify that changes get
+   propagated back to all the places they're supposed to be.
+
+   Grep wants private fixed already mapped.
+   The main things grep needs to know about mmap are:
+   * does it exist and is it safe to write into the mmap'd area
+   * how to use it (BSD variants)  */
+
+#include <fcntl.h>
+#include <sys/mman.h>
+
+#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
+char *malloc ();
+#endif
+
+/* This mess was copied from the GNU getpagesize.h.  */
+#ifndef HAVE_GETPAGESIZE
+# ifdef _SC_PAGESIZE
+#  define getpagesize() sysconf(_SC_PAGESIZE)
+# else /* no _SC_PAGESIZE */
+#  ifdef HAVE_SYS_PARAM_H
+#   include <sys/param.h>
+#   ifdef EXEC_PAGESIZE
+#    define getpagesize() EXEC_PAGESIZE
+#   else /* no EXEC_PAGESIZE */
+#    ifdef NBPG
+#     define getpagesize() NBPG * CLSIZE
+#     ifndef CLSIZE
+#      define CLSIZE 1
+#     endif /* no CLSIZE */
+#    else /* no NBPG */
+#     ifdef NBPC
+#      define getpagesize() NBPC
+#     else /* no NBPC */
+#      ifdef PAGESIZE
+#       define getpagesize() PAGESIZE
+#      endif /* PAGESIZE */
+#     endif /* no NBPC */
+#    endif /* no NBPG */
+#   endif /* no EXEC_PAGESIZE */
+#  else /* no HAVE_SYS_PARAM_H */
+#   define getpagesize() 8192	/* punt totally */
+#  endif /* no HAVE_SYS_PARAM_H */
+# endif /* no _SC_PAGESIZE */
+
+#endif /* no HAVE_GETPAGESIZE */
+
+int
+main ()
+{
+  char *data, *data2, *data3;
+  const char *cdata2;
+  int i, pagesize;
+  int fd, fd2;
+
+  pagesize = getpagesize ();
+
+  /* First, make a file with some known garbage in it. */
+  data = (char *) malloc (pagesize);
+  if (!data)
+    return 1;
+  for (i = 0; i < pagesize; ++i)
+    *(data + i) = rand ();
+  umask (0);
+  fd = creat ("conftest.mmap", 0600);
+  if (fd < 0)
+    return 2;
+  if (write (fd, data, pagesize) != pagesize)
+    return 3;
+  close (fd);
+
+  /* Next, check that the tail of a page is zero-filled.  File must have
+     non-zero length, otherwise we risk SIGBUS for entire page.  */
+  fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
+  if (fd2 < 0)
+    return 4;
+  cdata2 = "";
+  if (write (fd2, cdata2, 1) != 1)
+    return 5;
+  data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
+  if (data2 == MAP_FAILED)
+    return 6;
+  for (i = 0; i < pagesize; ++i)
+    if (*(data2 + i))
+      return 7;
+  close (fd2);
+  if (munmap (data2, pagesize))
+    return 8;
+
+  /* Next, try to mmap the file at a fixed address which already has
+     something else allocated at it.  If we can, also make sure that
+     we see the same garbage.  */
+  fd = open ("conftest.mmap", O_RDWR);
+  if (fd < 0)
+    return 9;
+  if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
+		     MAP_PRIVATE | MAP_FIXED, fd, 0L))
+    return 10;
+  for (i = 0; i < pagesize; ++i)
+    if (*(data + i) != *(data2 + i))
+      return 11;
+
+  /* Finally, make sure that changes to the mapped area do not
+     percolate back to the file as seen by read().  (This is a bug on
+     some variants of i386 svr4.0.)  */
+  for (i = 0; i < pagesize; ++i)
+    *(data2 + i) = *(data2 + i) + 1;
+  data3 = (char *) malloc (pagesize);
+  if (!data3)
+    return 12;
+  if (read (fd, data3, pagesize) != pagesize)
+    return 13;
+  for (i = 0; i < pagesize; ++i)
+    if (*(data + i) != *(data3 + i))
+      return 14;
+  close (fd);
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_func_mmap_fixed_mapped=yes
+else
+  ac_cv_func_mmap_fixed_mapped=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_mmap_fixed_mapped" >&5
+$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
+if test $ac_cv_func_mmap_fixed_mapped = yes; then
+
+$as_echo "#define HAVE_MMAP 1" >>confdefs.h
+
+fi
+rm -f conftest.mmap conftest.txt
+
+  if test "$ac_cv_func_mmap_fixed_mmaped" = "no"; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: The system does not support file memory mapping, option removed." >&5
+$as_echo "$as_me: The system does not support file memory mapping, option removed." >&6;}
+  else
+      USE_MMAP=-D__USE_MMAP__
+
+  fi
+fi
+
+#-------------------------------------------------------------------------------------------------------
+# Check for the Linux functions for controlling processor affinity.
+#-------------------------------------------------------------------------------------------------------
+# LINUX: sched_setaffinity
+# AIX:   bindprocessor
+# OSX (Leopard): thread_policy_set
+if test $enable_thread_affinity = "yes"; then
+  for ac_func in sched_setaffinity sched_getaffinity bindprocessor thread_policy_set
+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
+
+  if test "$ac_cv_func_sched_setaffinity" = "yes" ; then
+      # Test for the cpu process set type
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cpu_set_t available" >&5
+$as_echo_n "checking whether cpu_set_t available... " >&6; }
+if ${pac_cv_have_cpu_set_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+ #include <sched.h>
+int
+main ()
+{
+ cpu_set_t t;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  pac_cv_have_cpu_set_t=yes
+else
+  pac_cv_have_cpu_set_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_have_cpu_set_t" >&5
+$as_echo "$pac_cv_have_cpu_set_t" >&6; }
+      if test "$pac_cv_have_cpu_set_t" = yes ; then
+
+$as_echo "#define HAVE_CPU_SET_T 1" >>confdefs.h
+
+
+	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the CPU_SET and CPU_ZERO macros are defined" >&5
+$as_echo_n "checking whether the CPU_SET and CPU_ZERO macros are defined... " >&6; }
+if ${pac_cv_cpu_set_defined+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+	      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#define _GNU_SOURCE
+		  #include <sched.h>
+int
+main ()
+{
+ cpu_set_t t; CPU_ZERO(&t); CPU_SET(1,&t);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  pac_cv_cpu_set_defined=yes
+else
+  pac_cv_cpu_set_defined=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: $pac_cv_cpu_set_defined" >&5
+$as_echo "$pac_cv_cpu_set_defined" >&6; }
+	  if test "$pac_cv_cpu_set_defined" = "yes" ; then
+
+$as_echo "#define HAVE_CPU_SET_MACROS 1" >>confdefs.h
+
+	      #
+	      # Check for pthread_{,attr_}[sg]etaffinity_np.
+	      #
+	      ac_orig_LIBS="$LIBS"
+	      ac_orig_CFLAGS="$CFLAGS"
+	      LIBS="$ac_orig_LIBS $PTHREAD_LIBS"
+	      CFLAGS="$ac_orig_CFLAGS $PTHREAD_CFLAGS"
+	      { $as_echo "$as_me:${as_lineno-$LINENO}: checking pthread_attr_setaffinity_np" >&5
+$as_echo_n "checking pthread_attr_setaffinity_np... " >&6; }
+	      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#define _GNU_SOURCE
+		   #include <pthread.h>
+int
+main ()
+{
+cpu_set_t cpuset;
+		   pthread_attr_t attr;
+		   pthread_getaffinity_np (pthread_self (), sizeof (cpu_set_t), &cpuset);
+		   if (CPU_ISSET (0, &cpuset))
+		      CPU_SET (1, &cpuset);
+		   else
+		      CPU_ZERO (&cpuset);
+		   pthread_setaffinity_np (pthread_self (), sizeof (cpu_set_t), &cpuset);
+		   pthread_attr_init (&attr);
+		   pthread_attr_getaffinity_np (&attr, sizeof (cpu_set_t), &cpuset);
+		   pthread_attr_setaffinity_np (&attr, sizeof (cpu_set_t), &cpuset);
+
+  ;
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+$as_echo "#define HAVE_PTHREAD_AFFINITY_NP 1" >>confdefs.h
+
+	         USE_AFFINITY=-D__USE_AFFINITY__
+ { $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; }
+	         { $as_echo "$as_me:${as_lineno-$LINENO}: pthread_attr_setaffinity_np not available, affinity cannot be used." >&5
+$as_echo "$as_me: pthread_attr_setaffinity_np not available, affinity cannot be used." >&6;}
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+	      LIBS="$ac_orig_LIBS"
+	      CFLAGS="$ac_orig_CFLAGS"
+	  else
+	      { $as_echo "$as_me:${as_lineno-$LINENO}: CPU_SET and CPU_ZERO not available, affinity cannot be used." >&5
+$as_echo "$as_me: CPU_SET and CPU_ZERO not available, affinity cannot be used." >&6;}
+	  fi
+      fi
+  fi
+  if test "$ac_cv_func_thread_policy_set" = yes ; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether thread affinity macros defined" >&5
+$as_echo_n "checking whether thread affinity macros defined... " >&6; }
+if ${pac_cv_have_thread_affinity_policy+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <mach/thread_policy.h>
+int
+main ()
+{
+
+  #if !defined(THREAD_AFFINITY_POLICY) || !defined(THREAD_AFFINITY_TAG_NULL)
+      :'thread macros not defined
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  pac_cv_have_thread_affinity_policy=yes
+else
+  pac_cv_have_thread_affinity_policy=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_have_thread_affinity_policy" >&5
+$as_echo "$pac_cv_have_thread_affinity_policy" >&6; }
+      if test "$pac_cv_have_thread_affinity_policy" = yes ; then
+
+$as_echo "#define HAVE_OSX_THREAD_AFFINITY 1" >>confdefs.h
+
+      fi
+  fi
+
+
+fi
+
+for ac_func in gettimeofday memset munmap strtol memcpy fseek ftell
+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
+
+else
+  as_fn_error $? "Missing function." "$LINENO" 5
+fi
+done
+
+
+
+ac_config_files="$ac_config_files Makefile src/Fortran/Makefile src/C/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__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
+
+: "${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 PfTools $as_me 3.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 <thierry.schuepbach at isb-sib.ch>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+PfTools config.status 3.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/C/include/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/C/include/config.h" ;;
+    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+    "src/Fortran/Makefile") CONFIG_FILES="$CONFIG_FILES src/Fortran/Makefile" ;;
+    "src/C/Makefile") CONFIG_FILES="$CONFIG_FILES src/C/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
+
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..eb815e8
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,221 @@
+#                                               -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+AC_PREREQ([2.68])
+AC_INIT([PfTools],[3.0],[thierry.schuepbach at isb-sib.ch],[pftools])
+AC_LANG([C])
+AC_MSG_NOTICE([Configuring PfTools for your system.])
+AC_CANONICAL_TARGET
+
+AC_CONFIG_HEADERS([src/C/include/config.h])
+
+AM_INIT_AUTOMAKE
+
+PfTools_DATE="November 2012"
+PfTools_COPYRIGHT="Copyright (C) 2012 Swiss Institute of Bioinformatics."
+PfTools_LICENSE="Freely distributed under the GNU General Public License (GPLv3)."
+PfTools_VERSION=$PACKAGE_VERSION
+PfTools_URL="http://www.isb-sib.ch/"
+
+#-------------------------------------------------------------------------------------------------------
+# Checks for programs.
+#-------------------------------------------------------------------------------------------------------
+AC_PROG_F77
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_PROG_INSTALL
+AX_COMPILER_VENDOR
+
+#-------------------------------------------------------------------------------------------------------
+# Checks for target system
+#-------------------------------------------------------------------------------------------------------
+if test $target_cpu != "x86_64" ; then
+  AC_MSG_ERROR([Currently pftools only runs on 64 bit architectures.])
+fi
+
+#-------------------------------------------------------------------------------------------------------
+# Add features.
+#-------------------------------------------------------------------------------------------------------
+AC_ARG_ENABLE(mmap,
+              [AS_HELP_STRING([--enable-mmap],
+              [use memory mapping of files rather than libc fopen, default is yes])],
+              enable_mmap=$enableval, enable_mmap=yes)
+AC_ARG_ENABLE(thread-affinity,
+              [AS_HELP_STRING([--enable-thread-affinity],[Enforce affinity on threads, default is yes])],
+              enable_thread_affinity=$enableval, enable_thread_affinity=yes)
+
+#-------------------------------------------------------------------------------------------------------
+# Checks for libraries.
+#-------------------------------------------------------------------------------------------------------
+if test $ax_cv_c_compiler_vendor = "intel"; then
+  AC_CHECK_HEADERS([mathimf.h])
+  AC_SUBST([INTEL_IMF],[-limf])
+  AC_MSG_NOTICE([Intel IMF library will be used])
+fi
+AC_CHECK_LIB([m], [expf])
+
+#-------------------------------------------------------------------------------------------------------
+# Checks for header files.
+#-------------------------------------------------------------------------------------------------------
+AC_FUNC_ALLOCA
+AC_CHECK_HEADERS([fcntl.h limits.h stdlib.h string.h sys/time.h unistd.h inttypes.h mm_malloc.h])
+
+#-------------------------------------------------------------------------------------------------------
+# Checks for typedefs, structures, and compiler characteristics.
+#-------------------------------------------------------------------------------------------------------
+AC_HEADER_STDBOOL
+AC_PROG_CC_C99
+if test "$ac_cv_prog_cc_c99" = "no"; then
+  AC_MSG_ERROR([PfTools $PACKAGE_VERSION require a C compiler supporting C99 mode.])
+fi
+AC_C_INLINE
+AC_C_VOLATILE
+AC_C_CONST
+AC_C_RESTRICT
+
+AC_TYPE_OFF_T
+AC_TYPE_SIZE_T
+AC_TYPE_UID_T
+#AC_SYS_LARGEFILE
+
+#AC_HEADER_TIME
+
+AX_CHECK_COMPILE_FLAG(-msse2,[SIMD_SSE2_CFLAGS="-msse2"], SIMD_SSE2_CFLAGS="")
+if test $SIMD_SSE2_CFLAGS != "-msse2"; then
+  AC_MSG_ERROR([Compiler cannot generate SSE 2 code])
+#else
+#  AC_CHECK_HEADERS([emmintrin.h],[], [AC_MSG_ERROR([Missing SSE 2 header file emmintrin.h])])
+fi
+AC_SUBST(SIMD_SSE2_CFLAGS)
+
+AX_CHECK_COMPILE_FLAG(-msse4.1,[SIMD_SSE4_1_CFLAGS="-msse4.1"], SIMD_SSE4_1_CFLAGS="")
+if test $SIMD_SSE4_1_CFLAGS != "-msse4.1"; then
+  AC_MSG_ERROR([Compiler cannot generate SSE 4.1 code])
+#else
+#  AC_CHECK_HEADERS([smmintrin.h],[], [AC_MSG_ERROR([Missing SSE 4.1 header file smmintrin.h])])
+fi
+AC_SUBST(SIMD_SSE4_1_CFLAGS)
+
+AX_PTHREAD([AC_MSG_NOTICE([Posix thread found.])
+	    AC_SUBST(PTHREAD_LIBS)
+	    AC_SUBST(PTHREAD_CFLAGS) ],
+	    AC_MSG_ERROR([Posix thread not found.]))
+
+# get the fortran preprocessor option
+AC_MSG_CHECKING([for $F77 option to accept preprocessor commands])
+case $F77 in
+  gfortran) AC_SUBST(FPP_OPTION,[-cpp])
+	    AC_MSG_RESULT($FPP_OPTION);;
+  g77)      AC_SUBST(FPP_OPTION,[-cpp])
+            AC_MSG_RESULT($FPP_OPTION);;
+  ifort)    AC_SUBST(FPP_OPTION,[-fpp])
+            AC_MSG_RESULT($FPP_OPTION);;
+  *)	    AC_MSG_RESULT([unknown])
+            AC_MSG_NOTICE([You may encounter preprocessor statement warnings.])
+esac
+#-------------------------------------------------------------------------------------------------------
+# Checks for library functions.
+#-------------------------------------------------------------------------------------------------------
+AC_FUNC_MALLOC
+
+if test $enable_mmap = "yes"; then 
+  AC_FUNC_MMAP
+  if test "$ac_cv_func_mmap_fixed_mmaped" = "no"; then
+      AC_MSG_NOTICE([The system does not support file memory mapping, option removed.])
+  else
+      AC_SUBST(USE_MMAP,[-D__USE_MMAP__])
+  fi
+fi
+
+#-------------------------------------------------------------------------------------------------------
+# Check for the Linux functions for controlling processor affinity.
+#------------------------------------------------------------------------------------------------------- 
+# LINUX: sched_setaffinity
+# AIX:   bindprocessor
+# OSX (Leopard): thread_policy_set
+if test $enable_thread_affinity = "yes"; then
+  AC_CHECK_FUNCS(sched_setaffinity sched_getaffinity bindprocessor thread_policy_set)
+  if test "$ac_cv_func_sched_setaffinity" = "yes" ; then
+      # Test for the cpu process set type
+      AC_CACHE_CHECK(
+	[whether cpu_set_t available],pac_cv_have_cpu_set_t,[
+	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <sched.h>]], [[ cpu_set_t t; ]])],[pac_cv_have_cpu_set_t=yes],[pac_cv_have_cpu_set_t=no])])
+      if test "$pac_cv_have_cpu_set_t" = yes ; then
+	  AC_DEFINE(HAVE_CPU_SET_T,1,[Define if cpu_set_t is defined in sched.h])
+
+	  AC_CACHE_CHECK(
+	    [whether the CPU_SET and CPU_ZERO macros are defined],
+	    pac_cv_cpu_set_defined,
+	    [
+	      AC_LINK_IFELSE(
+		[AC_LANG_PROGRAM(
+		  [[#define _GNU_SOURCE
+		  #include <sched.h>]],
+		[[ cpu_set_t t; CPU_ZERO(&t); CPU_SET(1,&t); ]]
+		)
+		],
+	      [pac_cv_cpu_set_defined=yes],
+	      [pac_cv_cpu_set_defined=no]
+	      )
+	    ]
+	  )
+	  if test "$pac_cv_cpu_set_defined" = "yes" ; then
+	      AC_DEFINE(HAVE_CPU_SET_MACROS,1,[Define if CPU_SET and CPU_ZERO defined])
+	      #
+	      # Check for pthread_{,attr_}[sg]etaffinity_np.
+	      #
+	      ac_orig_LIBS="$LIBS"
+	      ac_orig_CFLAGS="$CFLAGS"
+	      LIBS="$ac_orig_LIBS $PTHREAD_LIBS"
+	      CFLAGS="$ac_orig_CFLAGS $PTHREAD_CFLAGS"
+	      AC_MSG_CHECKING([pthread_attr_setaffinity_np])
+	      AC_LINK_IFELSE(
+		[AC_LANG_PROGRAM(
+		  [#define _GNU_SOURCE
+		   #include <pthread.h>],
+		  [cpu_set_t cpuset;
+		   pthread_attr_t attr;
+		   pthread_getaffinity_np (pthread_self (), sizeof (cpu_set_t), &cpuset);
+		   if (CPU_ISSET (0, &cpuset))
+		      CPU_SET (1, &cpuset);
+		   else
+		      CPU_ZERO (&cpuset);
+		   pthread_setaffinity_np (pthread_self (), sizeof (cpu_set_t), &cpuset);
+		   pthread_attr_init (&attr);
+		   pthread_attr_getaffinity_np (&attr, sizeof (cpu_set_t), &cpuset);
+		   pthread_attr_setaffinity_np (&attr, sizeof (cpu_set_t), &cpuset);
+		  ])
+		],
+	        [AC_DEFINE(HAVE_PTHREAD_AFFINITY_NP, 1,[ Define if pthread_{,attr_}{g,s}etaffinity_np is supported.])
+	         AC_SUBST(USE_AFFINITY,[-D__USE_AFFINITY__]) AC_MSG_RESULT([yes])
+	        ],
+	        [AC_MSG_RESULT([no])
+	         AC_MSG_NOTICE([pthread_attr_setaffinity_np not available, affinity cannot be used.])
+	        ]
+	      )
+	      LIBS="$ac_orig_LIBS"
+	      CFLAGS="$ac_orig_CFLAGS"
+	  else 
+	      AC_MSG_NOTICE([CPU_SET and CPU_ZERO not available, affinity cannot be used.])
+	  fi
+      fi
+  fi
+  if test "$ac_cv_func_thread_policy_set" = yes ; then
+      AC_CACHE_CHECK([whether thread affinity macros defined],
+      pac_cv_have_thread_affinity_policy,[
+      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <mach/thread_policy.h>]], [[
+  #if !defined(THREAD_AFFINITY_POLICY) || !defined(THREAD_AFFINITY_TAG_NULL)
+      :'thread macros not defined
+  ]])],[pac_cv_have_thread_affinity_policy=yes],[pac_cv_have_thread_affinity_policy=no])])
+      if test "$pac_cv_have_thread_affinity_policy" = yes ; then
+	  AC_DEFINE(HAVE_OSX_THREAD_AFFINITY,1,[Define is the OSX thread affinity policy macros defined])
+      fi
+  fi
+  
+  
+fi
+
+AC_CHECK_FUNCS([gettimeofday memset munmap strtol memcpy fseek ftell],[],[AC_MSG_ERROR([Missing function.])])
+
+
+AC_CONFIG_FILES([Makefile src/Fortran/Makefile src/C/Makefile])
+AC_OUTPUT
diff --git a/CVPBR322 b/data/CVPBR322
similarity index 100%
rename from CVPBR322
rename to data/CVPBR322
diff --git a/GTPA_HUMAN b/data/GTPA_HUMAN
similarity index 100%
rename from GTPA_HUMAN
rename to data/GTPA_HUMAN
diff --git a/MYSA_HUMAN b/data/MYSA_HUMAN
similarity index 100%
rename from MYSA_HUMAN
rename to data/MYSA_HUMAN
diff --git a/R76849.seq b/data/R76849.seq
similarity index 100%
rename from R76849.seq
rename to data/R76849.seq
diff --git a/blosum100.cmp b/data/blosum100.cmp
similarity index 100%
rename from blosum100.cmp
rename to data/blosum100.cmp
diff --git a/blosum30.cmp b/data/blosum30.cmp
similarity index 100%
rename from blosum30.cmp
rename to data/blosum30.cmp
diff --git a/blosum45.cmp b/data/blosum45.cmp
similarity index 100%
rename from blosum45.cmp
rename to data/blosum45.cmp
diff --git a/blosum50.cmp b/data/blosum50.cmp
similarity index 100%
rename from blosum50.cmp
rename to data/blosum50.cmp
diff --git a/blosum62.cmp b/data/blosum62.cmp
similarity index 100%
rename from blosum62.cmp
rename to data/blosum62.cmp
diff --git a/blosum65.cmp b/data/blosum65.cmp
similarity index 100%
rename from blosum65.cmp
rename to data/blosum65.cmp
diff --git a/blosum80.cmp b/data/blosum80.cmp
similarity index 100%
rename from blosum80.cmp
rename to data/blosum80.cmp
diff --git a/coils.prf b/data/coils.prf
similarity index 100%
rename from coils.prf
rename to data/coils.prf
diff --git a/ecp.prf b/data/ecp.prf
similarity index 100%
rename from ecp.prf
rename to data/ecp.prf
diff --git a/gonnet.cmp b/data/gonnet.cmp
similarity index 100%
rename from gonnet.cmp
rename to data/gonnet.cmp
diff --git a/pam120.cmp b/data/pam120.cmp
similarity index 100%
rename from pam120.cmp
rename to data/pam120.cmp
diff --git a/pam160.cmp b/data/pam160.cmp
similarity index 100%
rename from pam160.cmp
rename to data/pam160.cmp
diff --git a/pam200.cmp b/data/pam200.cmp
similarity index 100%
rename from pam200.cmp
rename to data/pam200.cmp
diff --git a/pam220.cmp b/data/pam220.cmp
similarity index 100%
rename from pam220.cmp
rename to data/pam220.cmp
diff --git a/pam250.cmp b/data/pam250.cmp
similarity index 100%
rename from pam250.cmp
rename to data/pam250.cmp
diff --git a/pam30.cmp b/data/pam30.cmp
similarity index 100%
rename from pam30.cmp
rename to data/pam30.cmp
diff --git a/pam40.cmp b/data/pam40.cmp
similarity index 100%
rename from pam40.cmp
rename to data/pam40.cmp
diff --git a/pam400.cmp b/data/pam400.cmp
similarity index 100%
rename from pam400.cmp
rename to data/pam400.cmp
diff --git a/pam80.cmp b/data/pam80.cmp
similarity index 100%
rename from pam80.cmp
rename to data/pam80.cmp
diff --git a/pfam_sh3.hmm b/data/pfam_sh3.hmm
similarity index 100%
rename from pfam_sh3.hmm
rename to data/pfam_sh3.hmm
diff --git a/data/pfam_sh3.prf b/data/pfam_sh3.prf
new file mode 100644
index 0000000..807c5b5
--- /dev/null
+++ b/data/pfam_sh3.prf
@@ -0,0 +1,235 @@
+ID   SH3; MATRIX.
+AC   PF00018;
+DE   Src homology domain 3
+CC   RF    no
+CC   CS    no
+CC   MAP   yes
+CC   COM   hmmbuild -F HMM.ann SEED.ann
+CC   COM   hmmcalibrate --seed 0 HMM.ann
+CC   NSEQ  62
+CC   DATE  Tue May  4 18:40:13 1999
+CC   CKSUM 7040
+CC   GA    -12.0 -12.0
+CC   TC    -11.7 -11.7
+CC   NC    -12.7 -12.7
+MA   /GENERAL_SPEC: ALPHABET='ACDEFGHIKLMNPQRSTVWY'; LENGTH=57; LOG_BASE=1.000693; P0=0.9972;
+MA      P= 7.552, 1.698, 5.303, 6.320, 4.078, 6.844, 2.241, 5.732, 5.942, 9.343,
+MA         2.357, 4.531, 4.928, 4.025, 5.158, 7.225, 5.747, 6.525, 1.252, 3.200;
+MA   /DISJOINT: DEFINITION=PROTECT; N1=1; N2=57;
+MA   /NORMALIZATION: MODE=1; FUNCTION=LINEAR; R1=8.3219948; R2=0.0001112; TEXT='bitscore';
+MA   /CUT_OFF: LEVEL=0; SCORE=1602; N_SCORE=8.5000; MODE=1; TEXT='!';
+MA   /CUT_OFF: LEVEL=-1; SCORE=-16390; N_SCORE=6.5000; MODE=1; TEXT='?';
+MA   /DEFAULT: B0=*; B1=*; E0=*; E1=*; MM=*; II=*;
+MA   /I: I=*; I0=*; B0=-8455; B1=-8455; BM=-24; BD=-5907;
+MA   /M: SY='P'; M=-3118,-324,-9,905,-236,-914,-187,-548,1138,-1421,764,-1223,1413,676,633,-932,614,-1761,-4765,64; M0=-470;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-1; MI=-11047;
+MA      MD=-12090; IM=-894; II=-1115; DM=-701; DD=-1378;
+MA   /M: SY='Y'; M=-456,-185,-5221,-478,148,-4856,-3699,233,998,-69,741,-4329,-1251,1134,388,-1178,720,689,272,1594; M0=-807;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-1; MI=-11047;
+MA      MD=-12090; IM=-894; II=-1115; DM=-701; DD=-1378;
+MA   /M: SY='V'; M=1231,35,-5736,-5100,797,-311,-150,-462,-4695,-1544,-2421,-1133,-4989,-4318,-4495,-4023,-1272,2747,-3676,1405;
+MA      M0=-1920;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-1; MI=-11047;
+MA      MD=-12090; IM=-894; II=-1115; DM=-701; DD=-1378;
+MA   /M: SY='V'; M=-3426,-3930,-3954,-738,-3994,-4606,-3280,1624,1719,-3820,-567,-3514,-4676,517,1430,-3590,259,1937,-4280,-474;
+MA      M0=-1790;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-1; MI=-11047;
+MA      MD=-12090; IM=-894; II=-1115; DM=-701; DD=-1378;
+MA   /M: SY='A'; M=3488,-4652,-7454,-7803,-7382,-2133,-6729,-7189,-7417,-7466,-6491,-5787,-5756,-6836,-7004,-1903,-1496,527,-7607,
+MA      -7600; M0=-4715;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-1; MI=-11047;
+MA      MD=-12090; IM=-894; II=-1115; DM=-701; DD=-1378;
+MA   /M: SY='L'; M=-1844,-4144,-5241,-1015,-4167,-5250,-3769,1384,997,2639,-597,-4350,-5275,-89,-1357,-4348,-3907,-3604,-4473,
+MA      -4140; M0=-2287;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-1; MI=-11047;
+MA      MD=-12090; IM=-894; II=-1115; DM=-701; DD=-1378;
+MA   /M: SY='Y'; M=-1891,-5460,-7031,-6806,1873,-6874,425,-5144,-1511,-2008,-4734,-1167,-6859,-5811,-6126,-1842,-5745,-5125,-3443,
+MA      4468; M0=-3746;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-1; MI=-11047;
+MA      MD=-12090; IM=-894; II=-1115; DM=-701; DD=-1378;
+MA   /M: SY='D'; M=55,-5901,3654,-644,-6179,-1662,-3771,-5984,-1423,-2349,-5051,-1155,416,-3365,-4216,-483,-4266,-5509,-6081,-5285;
+MA      M0=-2429;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-1; MI=-11047;
+MA      MD=-12090; IM=-894; II=-1115; DM=-701; DD=-1378;
+MA   /M: SY='Y'; M=-7685,-6604,-8061,-8422,3225,-1960,-4127,-6574,-7979,-2486,-5973,-6553,-7796,-6695,-7338,-7190,-7539,-6734,
+MA      -3373,4179; M0=-5601;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-1; MI=-11047;
+MA      MD=-12090; IM=-894; II=-1115; DM=-701; DD=-1378;
+MA   /M: SY='Q'; M=593,-203,1008,1143,-1076,-4092,-277,-4653,486,-2504,457,258,17,1563,-2839,-900,807,290,-4770,-4089; M0=-885;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-1; MI=-11047;
+MA      MD=-12090; IM=-894; II=-1115; DM=-701; DD=-1378;
+MA   /M: SY='A'; M=2649,-4664,-2995,-1382,-5002,869,-2835,-4754,150,-4698,-3775,-901,1192,105,-2932,-103,-713,-4301,-4866,-4182;
+MA      M0=-1778;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-1; MI=-11047;
+MA      MD=-12090; IM=-894; II=-1115; DM=-701; DD=-1378;
+MA   /M: SY='Q'; M=-1032,-4590,-1270,1057,-4911,-646,79,-553,-90,-4606,234,565,-4184,1675,1345,466,989,120,-4773,-4090; M0=-997;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-1; MI=-11047;
+MA      MD=-12090; IM=-894; II=-1115; DM=-701; DD=-1378;
+MA   /M: SY='E'; M=-535,-4590,1353,1370,-4911,132,693,-2016,-456,-4606,-251,451,-1187,1356,-91,946,428,-4212,-4773,-4091; M0=-1075;
+MA   /I: I=-143,-497,243,46,-378,402,109,-623,213,-463,-717,284,397,48,99,364,120,-366,-291,-246; I0=-35; MM=-141; MI=-3427;
+MA      MD=-12090; IM=-480; II=-1820; DM=-701; DD=-1378;
+MA   /M: SY='P'; M=607,-4593,1638,977,-4914,241,-703,-4665,-383,-4609,-3682,-2728,1768,-638,-1280,1337,-599,-4215,-4776,-4093;
+MA      M0=-1423;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-1; MI=-11047;
+MA      MD=-12090; IM=-894; II=-1115; DM=-701; DD=-1378;
+MA   /M: SY='D'; M=-3117,-350,2629,894,-4911,697,-491,-4662,-1095,-4606,243,375,-4184,414,-171,777,-550,-4212,-4773,-905; M0=-1486;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-1; MI=-11047;
+MA      MD=-12090; IM=-894; II=-1115; DM=-701; DD=-1378;
+MA   /M: SY='E'; M=-5475,-7542,2352,3283,-1083,-5236,808,-7635,-5067,-7467,-6886,-1427,-5818,-1371,-6061,-5082,-1956,-7076,-7668,
+MA      -6540; M0=-4158;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-1; MI=-11047;
+MA      MD=-12090; IM=-894; II=-1115; DM=-701; DD=-1378;
+MA   /M: SY='L'; M=-6255,386,-8754,-8249,-4212,-8608,-7555,766,-8114,3032,825,-8317,-7733,-7028,-7712,-8014,-6142,114,-6072,-6251;
+MA      M0=-5156;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-1; MI=-11047;
+MA      MD=-12090; IM=-894; II=-1115; DM=-701; DD=-1378;
+MA   /M: SY='S'; M=-216,-4594,-27,-564,-4915,-555,-2753,-4666,-1014,-4610,-3684,-230,672,848,-1380,2370,1521,-4216,-4778,-4095;
+MA      M0=-1498;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-1; MI=-11047;
+MA      MD=-12090; IM=-894; II=-1115; DM=-701; DD=-1378;
+MA   /M: SY='F'; M=-2006,-4701,-7439,-6848,3722,-6824,-5723,651,-6522,1255,1079,-6484,-6607,-5933,-6272,-5978,-1647,-197,-5172,
+MA      -5019; M0=-3656;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-1; MI=-11047;
+MA      MD=-12090; IM=-894; II=-1115; DM=-701; DD=-1378;
+MA   /M: SY='K'; M=-485,-324,-1361,195,-4911,-766,-138,-4662,2259,-420,1093,-372,-1480,239,1334,-281,122,-4212,-4773,-880; M0=-892;
+MA   /I: I=-145,-496,237,49,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-26; MI=-5804;
+MA      MD=-12090; IM=-154; II=-3303; DM=-701; DD=-1378;
+MA   /M: SY='K'; M=-412,-4581,-2972,1766,-4898,-4096,-2755,-1466,2531,-2295,-3672,-2733,526,471,1071,-1439,-1229,-920,-4767,-4088;
+MA      M0=-1380;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-1; MI=-11047;
+MA      MD=-12090; IM=-894; II=-1115; DM=-701; DD=-1378;
+MA   /M: SY='G'; M=-2235,-6198,-335,-3794,-7594,3483,-4969,-7534,-1633,-7481,-6797,1364,-5809,-4684,-6234,-2138,-1851,-6693,-7667,
+MA      -6748; M0=-3846;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-1; MI=-11047;
+MA      MD=-12090; IM=-894; II=-1115; DM=-701; DD=-1378;
+MA   /M: SY='D'; M=24,-7662,3356,2188,-7755,-5257,-4721,-7765,-5176,-7586,-7043,-286,-5856,-428,-6226,-1947,-5655,-7193,-7794,
+MA      -6626; M0=-4106;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-1; MI=-11047;
+MA      MD=-12090; IM=-894; II=-1115; DM=-701; DD=-1378;
+MA   /M: SY='I'; M=-830,-3698,-3853,265,229,-4486,-3225,1801,1195,-1491,-73,-1187,-1117,125,-132,-3460,548,1667,-4082,-3634;
+MA      M0=-1038;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-1; MI=-11047;
+MA      MD=-12090; IM=-894; II=-1115; DM=-701; DD=-1378;
+MA   /M: SY='I'; M=-4797,396,-7189,-6591,1101,-6534,-5426,2628,-6248,1214,1906,-6188,-6383,-5715,-6014,-5671,-4725,1174,-4974,1208;
+MA      M0=-3503;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-1; MI=-11047;
+MA      MD=-12090; IM=-894; II=-1115; DM=-701; DD=-1378;
+MA   /M: SY='H'; M=-3180,-120,-445,531,915,-4258,1401,844,411,-520,-389,-1276,-4345,1088,-248,-1457,1267,-445,389,1019; M0=-705;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-1; MI=-11047;
+MA      MD=-12090; IM=-894; II=-1115; DM=-701; DD=-1378;
+MA   /M: SY='V'; M=-5253,-4749,-1822,-7575,-5426,-7744,-7689,2388,-7552,501,-4131,384,-7499,-7489,-7709,-7109,-5243,2901,-7117,
+MA      -6602; M0=-4316;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-1; MI=-11047;
+MA      MD=-12090; IM=-894; II=-1115; DM=-701; DD=-1378;
+MA   /M: SY='I'; M=-3433,993,-5781,-5147,-896,-4987,579,2146,-4744,2077,-2455,-4633,-5035,-4367,-4545,-16,-288,847,-3725,-3382;
+MA      M0=-2247;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-1; MI=-11047;
+MA      MD=-12090; IM=-894; II=-1115; DM=-701; DD=-1378;
+MA   /M: SY='E'; M=230,-4592,1533,1907,-4913,-495,-30,-4664,333,-4608,-3681,1833,-4185,237,-531,320,-1208,-4214,-4775,-4092;
+MA      M0=-1512;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-87; MI=-11047;
+MA      MD=-4110; IM=-894; II=-1115; DM=-701; DD=-1378;
+MA   /M: SY='K'; M=-3039,-4511,1646,88,-1347,-4013,-173,-1636,2374,-4526,376,-476,-4107,422,1201,-522,-810,-768,-4694,-164;
+MA      M0=-1257;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-1; MI=-10962;
+MA      MD=-12004; IM=-894; II=-1115; DM=-178; DD=-3109;
+MA   /M: SY='S'; M=-1874,-4585,977,847,-1202,-1629,385,-897,529,-663,-3675,364,-476,42,-2839,1386,405,718,-4770,-4088; M0=-606;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-75; MI=-11047;
+MA      MD=-4312; IM=-894; II=-1115; DM=-701; DD=-1378;
+MA   /M: SY='D'; M=-952,-4523,2047,1588,-4844,-974,-426,-4595,649,-1990,-3612,1944,310,-670,-2770,-489,-1122,-4145,-4706,-108;
+MA      M0=-1209;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-1; MI=-10973;
+MA      MD=-12015; IM=-894; II=-1115; DM=-197; DD=-2970;
+MA   /M: SY='D'; M=247,-67,1991,1239,-4912,1295,-251,-4662,-661,-4606,-3679,436,-323,-853,-508,684,-1381,-4212,-4774,-4091;
+MA      M0=-1292;
+MA   /I: I=-154,-507,261,60,-383,419,125,-630,210,-472,-716,289,396,48,89,355,110,-372,-285,-243; I0=-36; MM=-3946; MI=-97;
+MA      MD=-12090; IM=-533; II=-1694; DM=-701; DD=-1378;
+MA   /M: SY='W'; M=-9610,-7902,-8824,-9211,-8804,-7860,-8341,-10442,-9396,-9704,-9738,-9240,-8288,-9278,-8804,-10199,-9723,-10200,
+MA      6322,-8637; M0=-9100;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-1; MI=-11047;
+MA      MD=-12090; IM=-894; II=-1115; DM=-701; DD=-1378;
+MA   /M: SY='W'; M=-1550,1430,-5739,-5103,-50,-4941,-3811,-2712,-4698,-6,-206,-4587,-4991,-4321,-4498,-1076,-638,-1124,5469,1605;
+MA      M0=-2513;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-1; MI=-11047;
+MA      MD=-12090; IM=-894; II=-1115; DM=-701; DD=-1378;
+MA   /M: SY='K'; M=-3123,-4537,-25,1205,274,-4106,-2767,-1676,1992,-158,-271,-1308,-4198,-276,1474,-1513,615,-787,-4735,13; M0=-954;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-1; MI=-11047;
+MA      MD=-12090; IM=-894; II=-1115; DM=-701; DD=-1378;
+MA   /M: SY='G'; M=2097,1741,-7302,-7360,-6131,2370,-6309,-432,-7002,-5798,-5214,-1084,-5817,-6521,-6694,-4437,-4481,1559,-6681,
+MA      -6454; M0=-3709;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-1; MI=-11047;
+MA      MD=-12090; IM=-894; II=-1115; DM=-701; DD=-1378;
+MA   /M: SY='R'; M=-1124,-24,-707,1772,-4906,-4092,-494,-783,1209,-2036,-240,-850,-4185,1227,2260,-1529,-1351,-403,-4771,-4089;
+MA      M0=-1155;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-1; MI=-11047;
+MA      MD=-12090; IM=-894; II=-1115; DM=-701; DD=-1378;
+MA   /M: SY='C'; M=-1875,2196,440,-4266,-851,-4781,-3600,-753,-81,1020,-96,1767,-559,-3788,187,721,-1615,58,-3791,478; M0=-908;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-1; MI=-11047;
+MA      MD=-12090; IM=-894; II=-1115; DM=-701; DD=-1378;
+MA   /M: SY='N'; M=-520,-4577,644,-1303,-1279,-730,386,289,1350,378,-470,1361,-506,543,-98,-771,-423,-933,-4764,-1006; M0=-317;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-385; MI=-11047;
+MA      MD=-2096; IM=-894; II=-1115; DM=-701; DD=-1378;
+MA   /M: SY='N'; M=-173,-4188,1346,-768,-4483,1000,-2423,-1654,-743,-774,-75,1440,-3855,-1972,403,115,1124,-75,-4387,-793; M0=-639;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-334; MI=-10663;
+MA      MD=-2279; IM=-894; II=-1115; DM=-4079; DD=-88;
+MA   /M: SY='T'; M=-984,-3982,352,-1799,-4304,1875,-2139,-4055,-617,-3999,-3073,808,-3572,37,201,257,2331,-3605,-4166,-3483;
+MA      M0=-1421;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-349; MI=-10331;
+MA      MD=-2223; IM=-894; II=-1115; DM=-4766; DD=-54;
+MA   /M: SY='N'; M=-939,-3698,-2101,-1548,-4022,1998,602,-3763,177,47,-2790,2187,-3308,-13,906,65,-2183,-3322,-3875,-3206; M0=-1130;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-2626; MI=-9984;
+MA      MD=-257; IM=-894; II=-1115; DM=-831; DD=-1191;
+MA   /M: SY='G'; M=-3970,-5735,731,-2114,-6068,3376,-3148,-5924,-451,-5737,-5094,696,-4401,-2812,-345,-3636,-4021,-5417,-5853,
+MA      -4974; M0=-2997;
+MA   /I: I=-145,-496,237,49,-377,402,109,-622,214,-460,-717,279,398,49,100,363,121,-365,-291,-246; I0=-35; MM=-69; MI=-4436;
+MA      MD=-10655; IM=-986; II=-1014; DM=-303; DD=-2401;
+MA   /M: SY='Q'; M=-2959,-4431,-2807,810,-4752,-808,582,-1764,2137,-4447,-215,-150,-4026,2172,1632,-1628,-316,-718,-4615,-3932;
+MA      M0=-1427;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-1; MI=-10872;
+MA      MD=-11914; IM=-894; II=-1115; DM=-103; DD=-3864;
+MA   /M: SY='E'; M=-3148,-4336,-3122,2092,329,-4171,-2844,-651,162,-4306,-555,-2859,-549,1393,1250,-794,967,547,372,-3975; M0=-1248;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-1; MI=-11047;
+MA      MD=-12090; IM=-894; II=-1115; DM=-701; DD=-1378;
+MA   /M: SY='G'; M=-5930,-6295,-6847,-7178,-7869,3820,-7108,-8495,-7371,-2687,-7783,-6774,-7042,-1475,-7285,-6149,-6347,-7564,
+MA      -7598,-7685; M0=-5682;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-1; MI=-11047;
+MA      MD=-12090; IM=-894; II=-1115; DM=-701; DD=-1378;
+MA   /M: SY='W'; M=-3405,-275,-5750,-5114,1471,-4953,-3823,1441,-1960,1432,1419,-4599,-5001,-1352,-4509,-4037,-3345,-232,3556,2146;
+MA      M0=-2249;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-1; MI=-11047;
+MA      MD=-12090; IM=-894; II=-1115; DM=-701; DD=-1378;
+MA   /M: SY='F'; M=-1030,-4539,-7496,-7043,2734,-7057,-6268,2432,-6828,-1338,-3689,-6695,-6914,-6545,-6770,-6279,-4920,2289,-5870,
+MA      -687; M0=-3927;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-1; MI=-11047;
+MA      MD=-12090; IM=-894; II=-1115; DM=-701; DD=-1378;
+MA   /M: SY='P'; M=-6807,-6836,-8403,-8773,-8658,-6971,-8003,-9064,-8827,-8985,-8571,-7994,4311,-8549,-8350,-7104,-7233,-1621,
+MA      -7893,-8679; M0=-7061;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-1; MI=-11047;
+MA      MD=-12090; IM=-894; II=-1115; DM=-701; DD=-1378;
+MA   /M: SY='S'; M=1495,169,-3186,-1115,-4440,-934,437,-4102,-29,-933,-3381,-2912,-4291,-2484,-1474,2382,298,117,-4525,-3936;
+MA      M0=-1268;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-1; MI=-11047;
+MA      MD=-12090; IM=-894; II=-1115; DM=-701; DD=-1378;
+MA   /M: SY='N'; M=-1023,-4591,-1045,-978,-4908,-1811,-2764,-4655,-2348,-4606,-204,3572,-1370,35,-2855,754,170,-389,-4778,-4098;
+MA      M0=-1704;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-1; MI=-11047;
+MA      MD=-12090; IM=-894; II=-1115; DM=-701; DD=-1378;
+MA   /M: SY='Y'; M=-7620,190,-8049,-8389,2098,-7921,-261,-1329,-7946,-2068,-5893,-6544,-7775,-6677,-7314,-7166,-7472,-6649,-3374,
+MA      4530; M0=-5476;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-1; MI=-11047;
+MA      MD=-12090; IM=-894; II=-1115; DM=-701; DD=-1378;
+MA   /M: SY='V'; M=-5488,-4981,-8099,-7696,-192,-7865,-7348,1289,-7585,686,-328,-7528,-7472,-7136,-7522,-7197,-1485,3275,-6453,
+MA      -6274; M0=-4504;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-1; MI=-11047;
+MA      MD=-12090; IM=-894; II=-1115; DM=-701; DD=-1378;
+MA   /M: SY='Q'; M=472,-469,136,2150,-4911,-4091,-2750,-4662,-624,-4606,-3679,-2727,-4185,2217,374,-820,1414,-1033,-4774,-4091;
+MA      M0=-1650;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-1; MI=-11047;
+MA      MD=-12090; IM=-894; II=-1115; DM=-701; DD=-1378;
+MA   /M: SY='P'; M=-1621,-67,187,1146,-4746,-2048,-2789,-61,1005,323,786,-2781,2129,-944,-164,-795,-1078,-847,-4691,-1183; M0=-671;
+MA   /I: I=-145,-496,237,47,-377,403,110,-622,214,-462,-716,279,398,49,100,363,121,-365,-290,-245; I0=-35; MM=-1; MI=-11047;
+MA      MD=-12090; IM=-894; II=-1115; DM=-701; DD=-1378;
+MA   /M: SY='I'; M=-1822,-47,-1424,133,-83,-1962,-262,1476,516,-63,428,15,-1454,-779,-477,-199,-1519,1418,-4481,739; M0=-398;
+MA   /I: I=*; I0=*; E0=-1000; E1=-1000;
+CC   /GENERATED_BY="htop pfam_sh3.hmm";
+//
diff --git a/prosite13.prf b/data/prosite13.prf
similarity index 100%
rename from prosite13.prf
rename to data/prosite13.prf
diff --git a/score.lis b/data/score.lis
similarity index 100%
rename from score.lis
rename to data/score.lis
diff --git a/sh3.gpr b/data/sh3.gpr
similarity index 100%
rename from sh3.gpr
rename to data/sh3.gpr
diff --git a/sh3.msf b/data/sh3.msf
similarity index 100%
rename from sh3.msf
rename to data/sh3.msf
diff --git a/sh3.prf b/data/sh3.prf
similarity index 100%
rename from sh3.prf
rename to data/sh3.prf
diff --git a/sh3.seq b/data/sh3.seq
similarity index 100%
rename from sh3.seq
rename to data/sh3.seq
diff --git a/standard.random b/data/standard.random
similarity index 100%
rename from standard.random
rename to data/standard.random
diff --git a/test.out b/data/test.out
similarity index 71%
rename from test.out
rename to data/test.out
index 96878fe..bd483cb 100644
--- a/test.out
+++ b/data/test.out
@@ -1,169 +1,169 @@
 #----------------------------------------------------------------------#
-# pftools test 1: ./pfsearch -f -C 6.0 sh3.prf sh3.seq
+# pftools test 1: ./pfsearch -f sh3.prf sh3.seq C=6.0
 #----------------------------------------------------------------------#
-   8.455    459 pos.        1 -      39 sp|P03949|ABL1_CAEEL TYROSINE-PROTEIN KINASE ABL-1 (EC 2.7.1.112) (FRAGMENT).
-  14.973    857 pos.       61 -     121 sp|P00519|ABL1_HUMAN PROTO-ONCOGENE TYROSINE-PROTEIN KINASE ABL (EC 2.7.1.112) (P150) (C-ABL).
-  12.958    734 pos.       43 -     107 sp|P39969|BEB1_YEAST BEB1 PROTEIN.
-  13.499    767 pos.       58 -     128 sp|P04821|CC25_YEAST CELL DIVISION CONTROL PROTEIN 25.
-  10.043    556 pos.      100 -     161 sp|Q02640|CICX_HUMAN DIHYDROPRYRIDINE-SENSITIVE L-TYPE, BRAIN CALCIUM CHANNEL BETA-1-B1 SUBUNIT.
-  11.812    664 pos.      279 -     341 sp|P20936|GTPA_HUMAN GTPASE-ACTIVATING PROTEIN (GAP) (RAS P21 PROTEIN ACTIVATOR).
-  10.289    571 pos.      114 -     175 sp|Q08289|MSAB_HUMAN LAMBERT-EATON MYASTHENIC SYNDROME ANTIGEN B (MYSB).
-  18.100   1048 pos.     1053 -    1111 sp|P34092|MYSB_DICDI MYOSIN IB HEAVY CHAIN.
-  15.316    878 pos.      156 -     215 sp|P14598|NCF1_HUMAN NEUTROPHIL CYTOSOL FACTOR 1 (NCF-1) (NCF-47K) (47 KD AUTOSOMAL CHRONIC GRANULOMATOUS DISEASE PROTEIN).
-  12.238    690 pos.      226 -     285 sp|P14598|NCF1_HUMAN NEUTROPHIL CYTOSOL FACTOR 1 (NCF-1) (NCF-47K) (47 KD AUTOSOMAL CHRONIC GRANULOMATOUS DISEASE PROTEIN).
-  16.315    939 pos.        2 -      61 sp|P16333|NCK_HUMAN CYTOPLASMIC PROTEIN NCK.
-  15.284    876 pos.      115 -     165 sp|P16333|NCK_HUMAN CYTOPLASMIC PROTEIN NCK.
-  17.036    983 pos.      190 -     252 sp|P16333|NCK_HUMAN CYTOPLASMIC PROTEIN NCK.
-  13.384    760 pos.        3 -      79 sp|P23727|P85A_BOVIN PHOSPHATIDYLINOSITOL 3-KINASE REGULATORY ALPHA SUBUNIT (PI3-KINASE P85-ALPHA SUBUNIT) (PTDINS-3-KINASE P85-ALPHA) (PI3K).
-  15.464    887 pos.      769 -     829 sp|P16885|PIP5_HUMAN 1-PHOSPHATIDYLINOSITOL-4,5-BISPHOSPHATE PHOSPHODIESTERASE GAMMA 2 (EC 3.1.4.11) (PLC-GAMMA-2) (PHOSPHOLIPASE C-GAMMA-2) (PLC-IV).
-  15.382    882 pos.       24 -      86 sp|P40996|SCD2_SCHPO SCD2 PROTEIN.
-  11.992    675 pos.      123 -     185 sp|P40996|SCD2_SCHPO SCD2 PROTEIN.
-  16.889    974 pos.        1 -      58 sp|P29355|SEM5_CAEEL SEX MUSCLE ABNORMAL PROTEIN 5.
-  18.837   1093 pos.      154 -     213 sp|P29355|SEM5_CAEEL SEX MUSCLE ABNORMAL PROTEIN 5.
-  20.295   1182 pos.       80 -     141 sp|P00523|SRC_CHICK PROTO-ONCOGENE TYROSINE-PROTEIN KINASE SRC (EC 2.7.1.112) (P60-SRC).
-  10.764    600 pos.        1 -      60 sp|P26674|STE6_SCHPO STE6 PROTEIN.
-  11.796    663 pos.      617 -     660 sp|P15498|VAV_HUMAN VAV ONCOGENE.
-  17.560   1015 pos.      783 -     843 sp|P15498|VAV_HUMAN VAV ONCOGENE.
-  18.542   1075 pos.      314 -     373 sp|P43603|YFJ4_YEAST HYPOTHETICAL 40.4 KD PROTEIN IN PES4-HIS2 INTERGENIC REGION.
-  13.089    742 pos.      493 -     555 sp|P38822|YHR4_YEAST HYPOTHETICAL 71.2 KD PROTEIN IN CDC12-ORC6 INTERGENIC REGION.
-  13.695    779 pos.      577 -     633 sp|P38822|YHR4_YEAST HYPOTHETICAL 71.2 KD PROTEIN IN CDC12-ORC6 INTERGENIC REGION.
-   9.323    512 pos.      504 -     572 sp|Q07157|ZO1_HUMAN TIGHT JUNCTION PROTEIN ZO-1.
+  8.455    459 pos.      1 -    39 sp|P03949|ABL1_CAEEL TYROSINE-PROTEIN KINASE ABL-1 (EC 2.7.1.112) (FRAGMENT).
+ 14.973    857 pos.     61 -   121 sp|P00519|ABL1_HUMAN PROTO-ONCOGENE TYROSINE-PROTEIN KINASE ABL (EC 2.7.1.112) (P150) (C-ABL).
+ 12.958    734 pos.     43 -   107 sp|P39969|BEB1_YEAST BEB1 PROTEIN.
+ 13.499    767 pos.     58 -   128 sp|P04821|CC25_YEAST CELL DIVISION CONTROL PROTEIN 25.
+ 10.043    556 pos.    100 -   161 sp|Q02640|CICX_HUMAN DIHYDROPRYRIDINE-SENSITIVE L-TYPE, BRAIN CALCIUM CHANNEL BETA-1-B1 SUBUNIT.
+ 11.812    664 pos.    279 -   341 sp|P20936|GTPA_HUMAN GTPASE-ACTIVATING PROTEIN (GAP) (RAS P21 PROTEIN ACTIVATOR).
+ 10.289    571 pos.    114 -   175 sp|Q08289|MSAB_HUMAN LAMBERT-EATON MYASTHENIC SYNDROME ANTIGEN B (MYSB).
+ 18.100   1048 pos.   1053 -  1111 sp|P34092|MYSB_DICDI MYOSIN IB HEAVY CHAIN.
+ 15.316    878 pos.    156 -   215 sp|P14598|NCF1_HUMAN NEUTROPHIL CYTOSOL FACTOR 1 (NCF-1) (NCF-47K) (47 KD AUTOSOMAL CHRONIC GRANU
+ 12.238    690 pos.    226 -   285 sp|P14598|NCF1_HUMAN NEUTROPHIL CYTOSOL FACTOR 1 (NCF-1) (NCF-47K) (47 KD AUTOSOMAL CHRONIC GRANU
+ 16.315    939 pos.      2 -    61 sp|P16333|NCK_HUMAN CYTOPLASMIC PROTEIN NCK.
+ 15.284    876 pos.    115 -   165 sp|P16333|NCK_HUMAN CYTOPLASMIC PROTEIN NCK.
+ 17.036    983 pos.    190 -   252 sp|P16333|NCK_HUMAN CYTOPLASMIC PROTEIN NCK.
+ 13.384    760 pos.      3 -    79 sp|P23727|P85A_BOVIN PHOSPHATIDYLINOSITOL 3-KINASE REGULATORY ALPHA SUBUNIT (PI3-KINASE P85-ALPHA
+ 15.464    887 pos.    769 -   829 sp|P16885|PIP5_HUMAN 1-PHOSPHATIDYLINOSITOL-4,5-BISPHOSPHATE PHOSPHODIESTERASE GAMMA 2 (EC 3.1.4.
+ 15.382    882 pos.     24 -    86 sp|P40996|SCD2_SCHPO SCD2 PROTEIN.
+ 11.992    675 pos.    123 -   185 sp|P40996|SCD2_SCHPO SCD2 PROTEIN.
+ 16.889    974 pos.      1 -    58 sp|P29355|SEM5_CAEEL SEX MUSCLE ABNORMAL PROTEIN 5.
+ 18.837   1093 pos.    154 -   213 sp|P29355|SEM5_CAEEL SEX MUSCLE ABNORMAL PROTEIN 5.
+ 20.295   1182 pos.     80 -   141 sp|P00523|SRC_CHICK PROTO-ONCOGENE TYROSINE-PROTEIN KINASE SRC (EC 2.7.1.112) (P60-SRC).
+ 10.764    600 pos.      1 -    60 sp|P26674|STE6_SCHPO STE6 PROTEIN.
+ 11.796    663 pos.    617 -   660 sp|P15498|VAV_HUMAN VAV ONCOGENE.
+ 17.560   1015 pos.    783 -   843 sp|P15498|VAV_HUMAN VAV ONCOGENE.
+ 18.542   1075 pos.    314 -   373 sp|P43603|YFJ4_YEAST HYPOTHETICAL 40.4 KD PROTEIN IN PES4-HIS2 INTERGENIC REGION.
+ 13.089    742 pos.    493 -   555 sp|P38822|YHR4_YEAST HYPOTHETICAL 71.2 KD PROTEIN IN CDC12-ORC6 INTERGENIC REGION.
+ 13.695    779 pos.    577 -   633 sp|P38822|YHR4_YEAST HYPOTHETICAL 71.2 KD PROTEIN IN CDC12-ORC6 INTERGENIC REGION.
+  9.323    512 pos.    504 -   572 sp|Q07157|ZO1_HUMAN TIGHT JUNCTION PROTEIN ZO-1.
 #----------------------------------------------------------------------#
 # pftools test 2: ./pfsearch -bx ecp.prf CVPBR322 | ./psa2msa -du
 #----------------------------------------------------------------------#
->CVPBR322_1   63.920    271 pos.        1 -      41 J01749|CVPBR322 Cloning vector pBR322, complete genome.
+>CVPBR322_1  63.920    271 pos.      1 -    41 J01749|CVPBR322 Cloning vector pBR322, complete genome.
 TTCTCATGTTTGACAGCTTATCATC----GATAAGCTTTAATGCG
->CVPBR322_2   45.534    240 pos.       25 -      65 J01749|CVPBR322 Cloning vector pBR322, complete genome.
+>CVPBR322_2  45.534    240 pos.     25 -    65 J01749|CVPBR322 Cloning vector pBR322, complete genome.
 CGATAAGCTTTAATGCGGTAGTTTA----TCACAGTTAAATTGCT
->CVPBR322_3   55.617    257 pos.     1589 -    1629 J01749|CVPBR322 Cloning vector pBR322, complete genome.
+>CVPBR322_3  55.617    257 pos.   1589 -  1629 J01749|CVPBR322 Cloning vector pBR322, complete genome.
 CAACATGAATGGTCTTCGGTTTCCG----TGTTTCGTAAAGTCTG
->CVPBR322_4   46.720    242 pos.     2274 -    2314 J01749|CVPBR322 Cloning vector pBR322, complete genome.
+>CVPBR322_4  46.720    242 pos.   2274 -  2314 J01749|CVPBR322 Cloning vector pBR322, complete genome.
 CAGATTGTACTGAGAGTGCACCATA----TGCGGTGTGAAATACC
->CVPBR322_5   48.500    245 pos.     2296 -    2340 J01749|CVPBR322 Cloning vector pBR322, complete genome.
+>CVPBR322_5  48.500    245 pos.   2296 -  2340 J01749|CVPBR322 Cloning vector pBR322, complete genome.
 ATATGCGGTGTGAAATACCGCACAGATGCGTAAGGAGAAAATACC
->CVPBR322_6   64.513    272 pos.     2931 -    2972 J01749|CVPBR322 Cloning vector pBR322, complete genome.
+>CVPBR322_6  64.513    272 pos.   2931 -  2972 J01749|CVPBR322 Cloning vector pBR322, complete genome.
 ACAGAGTTCTTGAAGTGGTGGCCTA---ACTACGGCTACACTAGA
->CVPBR322_7   50.872    249 pos.     3207 -    3246 J01749|CVPBR322 Cloning vector pBR322, complete genome.
+>CVPBR322_7  50.872    249 pos.   3207 -  3246 J01749|CVPBR322 Cloning vector pBR322, complete genome.
 AAAAGGATCTTCACCTAGATCCTTT-----TAAATTAAAAATGAA
->CVPBR322_8   45.534    240 pos.     3233 -    3274 J01749|CVPBR322 Cloning vector pBR322, complete genome.
+>CVPBR322_8  45.534    240 pos.   3233 -  3274 J01749|CVPBR322 Cloning vector pBR322, complete genome.
 AAATTAAAAATGAAGTTTTAAATCA---ATCTAAAGTATATATGA
->CVPBR322_9   53.244    253 pos.     3240 -    3284 J01749|CVPBR322 Cloning vector pBR322, complete genome.
+>CVPBR322_9  53.244    253 pos.   3240 -  3284 J01749|CVPBR322 Cloning vector pBR322, complete genome.
 AAATGAAGTTTTAAATCAATCTAAAGTATATATGAGTAAACTTGG
->CVPBR322_10   52.058    251 pos.     3350 -    3391 J01749|CVPBR322 Cloning vector pBR322, complete genome.
+>CVPBR322_10  52.058    251 pos.   3350 -  3391 J01749|CVPBR322 Cloning vector pBR322, complete genome.
 CATAGTTGCCTGACTCCCCGTCGTG---TAGATAACTACGATACG
->CVPBR322_11   53.837    254 pos.     3788 -    3828 J01749|CVPBR322 Cloning vector pBR322, complete genome.
+>CVPBR322_11  53.837    254 pos.   3788 -  3828 J01749|CVPBR322 Cloning vector pBR322, complete genome.
 ACTGCATAATTCTCTTACTGTCATG----CCATCCGTAAGATGCT
->CVPBR322_12   46.127    241 pos.     3796 -    3836 J01749|CVPBR322 Cloning vector pBR322, complete genome.
+>CVPBR322_12  46.127    241 pos.   3796 -  3836 J01749|CVPBR322 Cloning vector pBR322, complete genome.
 ATTCTCTTACTGTCATGCCATCCGT----AAGATGCTTTTCTGTG
->CVPBR322_13   56.210    258 pos.     4133 -    4173 J01749|CVPBR322 Cloning vector pBR322, complete genome.
+>CVPBR322_13  56.210    258 pos.   4133 -  4173 J01749|CVPBR322 Cloning vector pBR322, complete genome.
 ACGGAAATGTTGAATACTCATACTC----TTCCTTTTTCAATATT
->CVPBR322_14   53.244    253 pos.     4166 -    4207 J01749|CVPBR322 Cloning vector pBR322, complete genome.
+>CVPBR322_14  53.244    253 pos.   4166 -  4207 J01749|CVPBR322 Cloning vector pBR322, complete genome.
 TCAATATTATTGAAGCATTTATCAG---GGTTATTGTCTCATGAG
->CVPBR322_15   52.058    251 pos.     4187 -    4227 J01749|CVPBR322 Cloning vector pBR322, complete genome.
+>CVPBR322_15  52.058    251 pos.   4187 -  4227 J01749|CVPBR322 Cloning vector pBR322, complete genome.
 TCAGGGTTATTGTCTCATGAGCGGA----TACATATTTGAATGTA
->CVPBR322_16   56.803    259 pos.     4273 -    4312 J01749|CVPBR322 Cloning vector pBR322, complete genome.
+>CVPBR322_16  56.803    259 pos.   4273 -  4312 J01749|CVPBR322 Cloning vector pBR322, complete genome.
 AAGTGCCACCTGACGTCTAAGAAAC-----CATTATTATCATGAC
->CVPBR322_17   47.906    244 pos.     4291 -    4331 J01749|CVPBR322 Cloning vector pBR322, complete genome.
+>CVPBR322_17  47.906    244 pos.   4291 -  4331 J01749|CVPBR322 Cloning vector pBR322, complete genome.
 AAGAAACCATTATTATCATGACATT----AACCTATAAAAATAGG
->CVPBR322_18   47.906    244 pos.     4299 -    4342 J01749|CVPBR322 Cloning vector pBR322, complete genome.
+>CVPBR322_18  47.906    244 pos.   4299 -  4342 J01749|CVPBR322 Cloning vector pBR322, complete genome.
 ATTATTATCATGACATTAACCTATA-AAAATAGGCGTATCACGAG
->CVPBR322_19   50.279    248 pos.     4348 -    4308 J01749|CVPBR322(-) Cloning vector pBR322, complete genome.
+>CVPBR322_19  50.279    248 pos.   4348 -  4308 J01749|CVPBR322 Cloning vector pBR322, complete genome.
 AAGGGCCTCGTGATACGCCTATTTT----TATAGGTTAATGTCAT
->CVPBR322_20   47.906    244 pos.     4336 -    4296 J01749|CVPBR322(-) Cloning vector pBR322, complete genome.
+>CVPBR322_20  47.906    244 pos.   4336 -  4296 J01749|CVPBR322 Cloning vector pBR322, complete genome.
 ATACGCCTATTTTTATAGGTTAATG----TCATGATAATAATGGT
->CVPBR322_21   50.279    248 pos.     4323 -    4283 J01749|CVPBR322(-) Cloning vector pBR322, complete genome.
+>CVPBR322_21  50.279    248 pos.   4323 -  4283 J01749|CVPBR322 Cloning vector pBR322, complete genome.
 TATAGGTTAATGTCATGATAATAAT----GGTTTCTTAGACGTCA
->CVPBR322_22   52.651    252 pos.     4232 -    4192 J01749|CVPBR322(-) Cloning vector pBR322, complete genome.
+>CVPBR322_22  52.651    252 pos.   4232 -  4192 J01749|CVPBR322 Cloning vector pBR322, complete genome.
 CTAAATACATTCAAATATGTATCCG----CTCATGAGACAATAAC
->CVPBR322_23   50.872    249 pos.     4178 -    4135 J01749|CVPBR322(-) Cloning vector pBR322, complete genome.
+>CVPBR322_23  50.872    249 pos.   4178 -  4135 J01749|CVPBR322 Cloning vector pBR322, complete genome.
 TCAATAATATTGAAAAAGGAAGAGT-ATGAGTATTCAACATTTCC
->CVPBR322_24   46.127    241 pos.     3954 -    3913 J01749|CVPBR322(-) Cloning vector pBR322, complete genome.
+>CVPBR322_24  46.127    241 pos.   3954 -  3913 J01749|CVPBR322 Cloning vector pBR322, complete genome.
 TGAGCACTTTTAAAGTTCTGCTATG---TGGCGCGGTATTATCCC
->CVPBR322_25   46.720    242 pos.     3861 -    3821 J01749|CVPBR322(-) Cloning vector pBR322, complete genome.
+>CVPBR322_25  46.720    242 pos.   3861 -  3821 J01749|CVPBR322 Cloning vector pBR322, complete genome.
 ATGACTTGGTTGAGTACTCACCAGT----CACAGAAAAGCATCTT
->CVPBR322_26   45.534    240 pos.     3569 -    3529 J01749|CVPBR322(-) Cloning vector pBR322, complete genome.
+>CVPBR322_26  45.534    240 pos.   3569 -  3529 J01749|CVPBR322 Cloning vector pBR322, complete genome.
 ACTACTTACTCTAGCTTCCCGGCAA----CAATTAATAGACTGGA
->CVPBR322_27   47.313    243 pos.     3464 -    3420 J01749|CVPBR322(-) Cloning vector pBR322, complete genome.
+>CVPBR322_27  47.313    243 pos.   3464 -  3420 J01749|CVPBR322 Cloning vector pBR322, complete genome.
 TGATAAATCTGGAGCCGGTGAGCGTGGGTCTCGCGGTATCATTGC
->CVPBR322_28   54.431    255 pos.     3301 -    3261 J01749|CVPBR322(-) Cloning vector pBR322, complete genome.
+>CVPBR322_28  54.431    255 pos.   3301 -  3261 J01749|CVPBR322 Cloning vector pBR322, complete genome.
 CATTGGTAACTGTCAGACCAAGTTT----ACTCATATATACTTTA
->CVPBR322_29   51.465    250 pos.     3273 -    3232 J01749|CVPBR322(-) Cloning vector pBR322, complete genome.
+>CVPBR322_29  51.465    250 pos.   3273 -  3232 J01749|CVPBR322 Cloning vector pBR322, complete genome.
 CATATATACTTTAGATTGATTTAAA---ACTTCATTTTTAATTTA
->CVPBR322_30   45.534    240 pos.     3267 -    3225 J01749|CVPBR322(-) Cloning vector pBR322, complete genome.
+>CVPBR322_30  45.534    240 pos.   3267 -  3225 J01749|CVPBR322 Cloning vector pBR322, complete genome.
 TACTTTAGATTGATTTAAAACTTCA--TTTTTAATTTAAAAGGAT
->CVPBR322_31   46.127    241 pos.     3250 -    3210 J01749|CVPBR322(-) Cloning vector pBR322, complete genome.
+>CVPBR322_31  46.127    241 pos.   3250 -  3210 J01749|CVPBR322 Cloning vector pBR322, complete genome.
 AAACTTCATTTTTAATTTAAAAGGA----TCTAGGTGAAGATCCT
->CVPBR322_32   53.244    253 pos.     3216 -    3173 J01749|CVPBR322(-) Cloning vector pBR322, complete genome.
+>CVPBR322_32  53.244    253 pos.   3216 -  3173 J01749|CVPBR322 Cloning vector pBR322, complete genome.
 AGATCCTTTTTGATAATCTCATGAC-CAAAATCCCTTAACGTGAG
->CVPBR322_33   60.362    265 pos.     3131 -    3091 J01749|CVPBR322(-) Cloning vector pBR322, complete genome.
+>CVPBR322_33  60.362    265 pos.   3131 -  3091 J01749|CVPBR322 Cloning vector pBR322, complete genome.
 AGGATCTTCTTGAGATCCTTTTTTT----CTGCGCGTAATCTGCT
->CVPBR322_34   47.313    243 pos.     2318 -    2274 J01749|CVPBR322(-) Cloning vector pBR322, complete genome.
+>CVPBR322_34  47.313    243 pos.   2318 -  2274 J01749|CVPBR322 Cloning vector pBR322, complete genome.
 GTGCGGTATTTCACACCGCATATGGTGCACTCTCAGTACAATCTG
->CVPBR322_35   58.582    262 pos.       85 -      41 J01749|CVPBR322(-) Cloning vector pBR322, complete genome.
+>CVPBR322_35  58.582    262 pos.     85 -    41 J01749|CVPBR322 Cloning vector pBR322, complete genome.
 ACACGGTGCCTGACTGCGTTAGCAATTTAACTGTGATAAACTACC
 #----------------------------------------------------------------------#
 # pftools test 3: ./pfscan -s GTPA_HUMAN prosite13.prf
 #----------------------------------------------------------------------#
->C2_DOMAIN_2   10.353    680 pos.      594 -     676 PS50004|C2_DOMAIN_2 C2-domain profile.
+>C2_DOMAIN_2  10.353    680 pos.    594 -   676 PS50004|C2_DOMAIN_2 C2-domain profile.
 SSLVLHIEEAHKLPVKHFTNPYCNIYLNSVQVAKTHAREGQNPVWSEEFVFDDLPPDINR
 FEITLSNKTKKSKDPDILFMRCQ
->PH_DOMAIN   16.616    659 pos.      474 -     577 PS50003|PH_DOMAIN PH domain profile.
+>PH_DOMAIN  16.616    659 pos.    474 -   577 PS50003|PH_DOMAIN PH domain profile.
 NIVKKGYLLKKGKGKRWKNLYFILEGSDAQLIYFESEKRATKPKGLIDLSVCSVYVVHDS
 LFGRPNCFQIVVQHFSEEHYIFYFAGETPEQAEDWMKGLQAFCN
->SH2_1   21.898   1450 pos.      181 -     272 PS50001|SH2 Src homology 2 (SH2) domain profile.
+>SH2_1  21.898   1450 pos.    181 -   272 PS50001|SH2 Src homology 2 (SH2) domain profile.
 WYHGKLDRTIAEERLRQAGKSGSYLIRESDRRPGSFVLSFLSQMNVVNHFRIIAMCGDYY
 IGGRRFSSLSDLIGYYSHVSCLLKGEKLLYPV
->SH2_2   20.059   1326 pos.      351 -     441 PS50001|SH2 Src homology 2 (SH2) domain profile.
+>SH2_2  20.059   1326 pos.    351 -   441 PS50001|SH2 Src homology 2 (SH2) domain profile.
 WFHGKISKQEAYNLLMTVGQVCSFLVRPSDNTPGDYSLYFRTNENIQRFKICPTPNNQFM
 MGGRYYNSIGDIIDHYRKEQIVEGYYLKEPV
->SH3   11.812    664 pos.      279 -     341 PS50002|SH3 Src homology 3 (SH3) domain profile.
+>SH3  11.812    664 pos.    279 -   341 PS50002|SH3 Src homology 3 (SH3) domain profile.
 EDRRRVRAILPYTKVPDTDEISFLKGDMFIVHNELEDGWMWVTNLRTDEQGLIVEDLVEE
 VGR
->RAS_GTPASE_ACTIV_2   56.401   3900 pos.      748 -     942 PS50018|RAS_GTPASE_ACTIV_2 Ras GTPase-activating proteins profile.
+>RAS_GTPASE_ACTIV_2  56.401   3900 pos.    748 -   942 PS50018|RAS_GTPASE_ACTIV_2 Ras GTPase-activating proteins profile.
 DRTLLASILLRIFLHEKLESLLLCTLNDREISMEDEATTLFRATTLASTLMEQYMKATAT
 QFVHHALKDSILKIMESKQSCELSPSKLEKNEDVNTNLTHLLNILSELVEKIFMASEILP
 PTLRYIYGCLQKSVQHKWPTNTTMRTRVVSGFVFLRLICPAILNPRMFNIISDSPSPIAA
 RTLILVAKSVQNLAN
 #----------------------------------------------------------------------#
-# pftools test 4: ./pfscan -by -C 2 CVPBR322 ecp.prf
+# pftools test 4: ./pfscan -by CVPBR322 ecp.prf L=2
 #----------------------------------------------------------------------#
-  63.920    271 pos.        1 -      41 NS00001|ECOLI_PROM_RP70 E. coli RNA POL sigma-70 promoter.
+ 63.920    271 pos.      1 -    41 NS00001|ECOLI_PROM_RP70 E. coli RNA POL sigma-70 promoter.
 #
-# P        1 *********TTGACA*********************TATAAT***       -1 
-# S        1 TTCTCATGTTTGACAGCTTATCATC----GATAAGCTTTAATGCG    -4321 
+# P       1 *********TTGACA*********************TATAAT***      -1 
+# S       1 TTCTCATGTTTGACAGCTTATCATC----GATAAGCTTTAATGCG   -4321 
 #
-  55.617    257 pos.     1589 -    1629 NS00001|ECOLI_PROM_RP70 E. coli RNA POL sigma-70 promoter.
+ 55.617    257 pos.   1589 -  1629 NS00001|ECOLI_PROM_RP70 E. coli RNA POL sigma-70 promoter.
 #
-# P        1 *********TTGACA*********************TATAAT***       -1 
-# S     1589 CAACATGAATGGTCTTCGGTTTCCG----TGTTTCGTAAAGTCTG    -2733 
+# P       1 *********TTGACA*********************TATAAT***      -1 
+# S    1589 CAACATGAATGGTCTTCGGTTTCCG----TGTTTCGTAAAGTCTG   -2733 
 #
-  64.513    272 pos.     2931 -    2972 NS00001|ECOLI_PROM_RP70 E. coli RNA POL sigma-70 promoter.
+ 64.513    272 pos.   2931 -  2972 NS00001|ECOLI_PROM_RP70 E. coli RNA POL sigma-70 promoter.
 #
-# P        1 *********TTGACA*********************TATAAT***       -1 
-# S     2931 ACAGAGTTCTTGAAGTGGTGGCCTA---ACTACGGCTACACTAGA    -1390 
+# P       1 *********TTGACA*********************TATAAT***      -1 
+# S    2931 ACAGAGTTCTTGAAGTGGTGGCCTA---ACTACGGCTACACTAGA   -1390 
 #
-  56.210    258 pos.     4133 -    4173 NS00001|ECOLI_PROM_RP70 E. coli RNA POL sigma-70 promoter.
+ 56.210    258 pos.   4133 -  4173 NS00001|ECOLI_PROM_RP70 E. coli RNA POL sigma-70 promoter.
 #
-# P        1 *********TTGACA*********************TATAAT***       -1 
-# S     4133 ACGGAAATGTTGAATACTCATACTC----TTCCTTTTTCAATATT     -189 
+# P       1 *********TTGACA*********************TATAAT***      -1 
+# S    4133 ACGGAAATGTTGAATACTCATACTC----TTCCTTTTTCAATATT    -189 
 #
-  56.803    259 pos.     4273 -    4312 NS00001|ECOLI_PROM_RP70 E. coli RNA POL sigma-70 promoter.
+ 56.803    259 pos.   4273 -  4312 NS00001|ECOLI_PROM_RP70 E. coli RNA POL sigma-70 promoter.
 #
-# P        1 *********TTGACA*********************TATAAT***       -1 
-# S     4273 AAGTGCCACCTGACGTCTAAGAAAC-----CATTATTATCATGAC      -50 
+# P       1 *********TTGACA*********************TATAAT***      -1 
+# S    4273 AAGTGCCACCTGACGTCTAAGAAAC-----CATTATTATCATGAC     -50 
 #
-  60.362    265 pos.     3131 -    3091 NS00001|ECOLI_PROM_RP70(-) E. coli RNA POL sigma-70 promoter.
+ 60.362    265 pos.   3131 -  3091 NS00001|ECOLI_PROM_RP70 E. coli RNA POL sigma-70 promoter.
 #
-# P        1 *********TTGACA*********************TATAAT***       -1 
-# S     3131 AGGATCTTCTTGAGATCCTTTTTTT----CTGCGCGTAATCTGCT    -1271 
+# P       1 *********TTGACA*********************TATAAT***      -1 
+# S    3131 AGGATCTTCTTGAGATCCTTTTTTT----CTGCGCGTAATCTGCT   -1271 
 #
-  58.582    262 pos.       85 -      41 NS00001|ECOLI_PROM_RP70(-) E. coli RNA POL sigma-70 promoter.
+ 58.582    262 pos.     85 -    41 NS00001|ECOLI_PROM_RP70 E. coli RNA POL sigma-70 promoter.
 #
-# P        1 *********TTGACA*********************TATAAT***       -1 
-# S       85 ACACGGTGCCTGACTGCGTTAGCAATTTAACTGTGATAAACTACC    -4321 
+# P       1 *********TTGACA*********************TATAAT***      -1 
+# S      85 ACACGGTGCCTGACTGCGTTAGCAATTTAACTGTGATAAACTACC   -4321 
 #
 #----------------------------------------------------------------------#
-# pftools test 5: ./gtop -F 50 sh3.gpr | ./pfsearch -far - sh3.seq
+# pftools test 5: ./gtop sh3.gpr F=50 | ./pfsearch -far - sh3.seq
 #                    | sort -nr
 #----------------------------------------------------------------------#
     944 sp|P00523|SRC_CHICK PROTO-ONCOGENE TYROSINE-PROTEIN KINASE SRC (EC 2.7.1.112) (P60-SRC).
@@ -171,8 +171,8 @@ RTLILVAKSVQNLAN
     839 sp|P29355|SEM5_CAEEL SEX MUSCLE ABNORMAL PROTEIN 5.
     825 sp|P16333|NCK_HUMAN CYTOPLASMIC PROTEIN NCK.
     819 sp|P15498|VAV_HUMAN VAV ONCOGENE.
-    805 sp|P16885|PIP5_HUMAN 1-PHOSPHATIDYLINOSITOL-4,5-BISPHOSPHATE PHOSPHODIESTERASE GAMMA 2 (EC 3.1.4.11) (PLC-GAMMA-2) (PHOSPHOLIPASE C-GAMMA-2) (PLC-IV).
-    764 sp|P23727|P85A_BOVIN PHOSPHATIDYLINOSITOL 3-KINASE REGULATORY ALPHA SUBUNIT (PI3-KINASE P85-ALPHA SUBUNIT) (PTDINS-3-KINASE P85-ALPHA) (PI3K).
+    805 sp|P16885|PIP5_HUMAN 1-PHOSPHATIDYLINOSITOL-4,5-BISPHOSPHATE PHOSPHODIESTERASE GAMMA 2 (EC 3.1.4.11) (PLC-GAMMA-2) (PHOSPHOL
+    764 sp|P23727|P85A_BOVIN PHOSPHATIDYLINOSITOL 3-KINASE REGULATORY ALPHA SUBUNIT (PI3-KINASE P85-ALPHA SUBUNIT) (PTDINS-3-KINASE 
     750 sp|P34092|MYSB_DICDI MYOSIN IB HEAVY CHAIN.
     744 sp|P14598|NCF1_HUMAN NEUTROPHIL CYTOSOL FACTOR 1 (NCF-1) (NCF-47K) (47 KD AUTOSOMAL CHRONIC GRANULOMATOUS DISEASE PROTEIN).
     699 sp|P00519|ABL1_HUMAN PROTO-ONCOGENE TYROSINE-PROTEIN KINASE ABL (EC 2.7.1.112) (P150) (C-ABL).
@@ -190,42 +190,42 @@ RTLILVAKSVQNLAN
 # pftools test 6: ./htop pfam_sh3.hmm  | ./pfsearch -f - sh3.seq
                      | sort -nr
 #----------------------------------------------------------------------#
-  19.485 100384 pos.      317 -     373 sp|P43603|YFJ4_YEAST HYPOTHETICAL 40.4 KD PROTEIN IN PES4-HIS2 INTERGENIC REGION.
-  19.303  98748 pos.      157 -     211 sp|P29355|SEM5_CAEEL SEX MUSCLE ABNORMAL PROTEIN 5.
-  19.183  97669 pos.       83 -     139 sp|P00523|SRC_CHICK PROTO-ONCOGENE TYROSINE-PROTEIN KINASE SRC (EC 2.7.1.112) (P60-SRC).
-  18.790  94141 pos.     1056 -    1111 sp|P34092|MYSB_DICDI MYOSIN IB HEAVY CHAIN.
-  18.265  89412 pos.      786 -     841 sp|P15498|VAV_HUMAN VAV ONCOGENE.
-  17.931  86411 pos.        1 -      56 sp|P29355|SEM5_CAEEL SEX MUSCLE ABNORMAL PROTEIN 5.
-  17.706  84386 pos.      193 -     250 sp|P16333|NCK_HUMAN CYTOPLASMIC PROTEIN NCK.
-  17.657  83950 pos.      772 -     827 sp|P16885|PIP5_HUMAN 1-PHOSPHATIDYLINOSITOL-4,5-BISPHOSPHATE PHOSPHODIESTERASE GAMMA 2 (EC 3.1.4.11) (PLC-GAMMA-2) (PHOSPHOLIPASE C-GAMMA-2) (PLC-IV).
-  17.544  82931 pos.        5 -      59 sp|P16333|NCK_HUMAN CYTOPLASMIC PROTEIN NCK.
-  16.584  74299 pos.       27 -      84 sp|P40996|SCD2_SCHPO SCD2 PROTEIN.
-  16.486  73418 pos.      159 -     213 sp|P14598|NCF1_HUMAN NEUTROPHIL CYTOSOL FACTOR 1 (NCF-1) (NCF-47K) (47 KD AUTOSOMAL CHRONIC GRANULOMATOUS DISEASE PROTEIN).
-  16.430  72911 pos.       64 -     119 sp|P00519|ABL1_HUMAN PROTO-ONCOGENE TYROSINE-PROTEIN KINASE ABL (EC 2.7.1.112) (P150) (C-ABL).
-  15.759  66878 pos.       46 -     105 sp|P39969|BEB1_YEAST BEB1 PROTEIN.
-  15.511  64650 pos.      229 -     283 sp|P14598|NCF1_HUMAN NEUTROPHIL CYTOSOL FACTOR 1 (NCF-1) (NCF-47K) (47 KD AUTOSOMAL CHRONIC GRANULOMATOUS DISEASE PROTEIN).
-  15.503  64573 pos.      109 -     163 sp|P16333|NCK_HUMAN CYTOPLASMIC PROTEIN NCK.
-  14.963  59722 pos.      496 -     553 sp|P38822|YHR4_YEAST HYPOTHETICAL 71.2 KD PROTEIN IN CDC12-ORC6 INTERGENIC REGION.
-  14.515  55695 pos.      126 -     183 sp|P40996|SCD2_SCHPO SCD2 PROTEIN.
-  13.945  50565 pos.        3 -      58 sp|P26674|STE6_SCHPO STE6 PROTEIN.
-  13.506  46616 pos.      580 -     633 sp|P38822|YHR4_YEAST HYPOTHETICAL 71.2 KD PROTEIN IN CDC12-ORC6 INTERGENIC REGION.
-  13.399  45653 pos.      282 -     339 sp|P20936|GTPA_HUMAN GTPASE-ACTIVATING PROTEIN (GAP) (RAS P21 PROTEIN ACTIVATOR).
-  11.564  29159 pos.        6 -      77 sp|P23727|P85A_BOVIN PHOSPHATIDYLINOSITOL 3-KINASE REGULATORY ALPHA SUBUNIT (PI3-KINASE P85-ALPHA SUBUNIT) (PTDINS-3-KINASE P85-ALPHA) (PI3K).
-  11.218  26047 pos.       61 -     126 sp|P04821|CC25_YEAST CELL DIVISION CONTROL PROTEIN 25.
-  10.425  18915 pos.      601 -     658 sp|P15498|VAV_HUMAN VAV ONCOGENE.
+ 19.485 100384 pos.    317 -   373 sp|P43603|YFJ4_YEAST HYPOTHETICAL 40.4 KD PROTEIN IN PES4-HIS2 INTERGENIC REGION.
+ 19.303  98748 pos.    157 -   211 sp|P29355|SEM5_CAEEL SEX MUSCLE ABNORMAL PROTEIN 5.
+ 19.183  97669 pos.     83 -   139 sp|P00523|SRC_CHICK PROTO-ONCOGENE TYROSINE-PROTEIN KINASE SRC (EC 2.7.1.112) (P60-SRC).
+ 18.790  94141 pos.   1056 -  1111 sp|P34092|MYSB_DICDI MYOSIN IB HEAVY CHAIN.
+ 18.265  89412 pos.    786 -   841 sp|P15498|VAV_HUMAN VAV ONCOGENE.
+ 17.931  86411 pos.      1 -    56 sp|P29355|SEM5_CAEEL SEX MUSCLE ABNORMAL PROTEIN 5.
+ 17.706  84386 pos.    193 -   250 sp|P16333|NCK_HUMAN CYTOPLASMIC PROTEIN NCK.
+ 17.657  83950 pos.    772 -   827 sp|P16885|PIP5_HUMAN 1-PHOSPHATIDYLINOSITOL-4,5-BISPHOSPHATE PHOSPHODIESTERASE GAMMA 2 (EC 3.1.4.
+ 17.544  82931 pos.      5 -    59 sp|P16333|NCK_HUMAN CYTOPLASMIC PROTEIN NCK.
+ 16.584  74299 pos.     27 -    84 sp|P40996|SCD2_SCHPO SCD2 PROTEIN.
+ 16.486  73418 pos.    159 -   213 sp|P14598|NCF1_HUMAN NEUTROPHIL CYTOSOL FACTOR 1 (NCF-1) (NCF-47K) (47 KD AUTOSOMAL CHRONIC GRANU
+ 16.430  72911 pos.     64 -   119 sp|P00519|ABL1_HUMAN PROTO-ONCOGENE TYROSINE-PROTEIN KINASE ABL (EC 2.7.1.112) (P150) (C-ABL).
+ 15.759  66878 pos.     46 -   105 sp|P39969|BEB1_YEAST BEB1 PROTEIN.
+ 15.511  64650 pos.    229 -   283 sp|P14598|NCF1_HUMAN NEUTROPHIL CYTOSOL FACTOR 1 (NCF-1) (NCF-47K) (47 KD AUTOSOMAL CHRONIC GRANU
+ 15.503  64573 pos.    109 -   163 sp|P16333|NCK_HUMAN CYTOPLASMIC PROTEIN NCK.
+ 14.963  59722 pos.    496 -   553 sp|P38822|YHR4_YEAST HYPOTHETICAL 71.2 KD PROTEIN IN CDC12-ORC6 INTERGENIC REGION.
+ 14.515  55695 pos.    126 -   183 sp|P40996|SCD2_SCHPO SCD2 PROTEIN.
+ 13.945  50565 pos.      3 -    58 sp|P26674|STE6_SCHPO STE6 PROTEIN.
+ 13.506  46616 pos.    580 -   633 sp|P38822|YHR4_YEAST HYPOTHETICAL 71.2 KD PROTEIN IN CDC12-ORC6 INTERGENIC REGION.
+ 13.399  45653 pos.    282 -   339 sp|P20936|GTPA_HUMAN GTPASE-ACTIVATING PROTEIN (GAP) (RAS P21 PROTEIN ACTIVATOR).
+ 11.564  29159 pos.      6 -    77 sp|P23727|P85A_BOVIN PHOSPHATIDYLINOSITOL 3-KINASE REGULATORY ALPHA SUBUNIT (PI3-KINASE P85-ALPHA
+ 11.218  26047 pos.     61 -   126 sp|P04821|CC25_YEAST CELL DIVISION CONTROL PROTEIN 25.
+ 10.425  18915 pos.    601 -   658 sp|P15498|VAV_HUMAN VAV ONCOGENE.
 #----------------------------------------------------------------------#
-# pftools test 7: ./pfw -N 1000 sh3.msf |
-#                    ./pfmake -b -H 0.6 - blosum45.cmp
+# pftools test 7: ./pfw sh3.msf N=1000 |
+#                    ./pfmake -b - blosum45.cmp H=0.6
 #----------------------------------------------------------------------#
-ID   SEQUENCE_PROFILE; MATRIX.
+ID   SEQUENCE_RPOFILE; MATRIX.
 AC   ZZ99999;
-DT   Tue Dec  9 15:13:02 2003
+DT   Wed Jul 14 12:27:00 1999
 DE   Generated from MSF file: 'stdin'.
 MA   /GENERAL_SPEC: ALPHABET='ABCDEFGHIKLMNPQRSTVWYZ'; LENGTH=62;
 MA   /DISJOINT: DEFINITION=PROTECT; N1=6; N2=57;
 MA   /NORMALIZATION: MODE=1; FUNCTION=LINEAR; R1=0.0000000; R2=0.0100000; TEXT='No_units';
-MA   /CUT_OFF: LEVEL=0; SCORE=850; N_SCORE=8.5; MODE=1; TEXT='!';
-MA   /CUT_OFF: LEVEL=-1; SCORE=650; N_SCORE=6.5; MODE=1; TEXT='?';
+MA   /CUT_OFF: LEVEL=0; SCORE=850; N_SCORE=8.5000; MODE=1; TEXT='!';
+MA   /CUT_OFF: LEVEL=-1; SCORE=650; N_SCORE=6.5000; MODE=1; TEXT='?';
 MA   /DEFAULT: M0=-8; D=-20; I=-20; B1=-60; E1=-60; MI=-105; MD=-105; IM=-105; DM=-105;
 MA   /I: B1=0; BI=-105; BD=-105;
 MA   /M: SY='P'; M=-1,-9,-25,-10,-4,-19,-4,-12,-14,-7,-16,-8,-6,3,-4,-9,0,-4,-13,-24,-14,-6;
@@ -298,10 +298,10 @@ MA   /M: SY='I'; M=-7,-12,-22,-14,-10,-8,-22,-11,4,-9,-2,2,-9,-19,-5,-8,-3,-1,4,
 MA   /M: SY='N'; M=-7,5,-24,6,-2,-22,6,-8,-22,-5,-19,-14,7,-17,-4,-5,2,-5,-17,-27,-15,-4;
 MA   /M: SY='S'; M=0,-1,-13,-3,-4,-19,-13,-4,-15,-4,-15,-10,2,-16,-2,-2,7,2,-9,-30,-13,-4;
 MA   /I: E1=0; IE=-105; DE=-105;
-CC   /GENERATED_BY="./pfmake -b -H 0.6 - blosum45.cmp";
+CC   /GENERATED_BY="./pfmake -b - blosum45.cmp H=0.6";
 //
 #----------------------------------------------------------------------#
-# pftools test 8:./ptoh -L 1.15 ecp.prf
+# pftools test 8:./ptoh ecp.prf L=1.15
 #----------------------------------------------------------------------#
 # HMM v1.7
 45      # M -- length of model
@@ -1231,8 +1231,8 @@ no      # Optional consensus structure annotation?
 0.250000        # Symbol G probability
 0.250000        # Symbol T probability
 #----------------------------------------------------------------------#
-# pftools test 9: ./pfscale -N 14147368 -P 0.0001 -Q 0.000001 score.lis
-#                    | sed -n 1,25p
+# pftools test 9: ./pfscale score.lis N=14147368 P=0.0001
+#                    Q=0.000001 | sed -n 1,25p
 #----------------------------------------------------------------------#
 # -LogP =  2.0437 +   0.00741886 * raw-score
 #
@@ -1262,76 +1262,76 @@ no      # Optional consensus structure annotation?
 #----------------------------------------------------------------------#
 # pftools test 10: ./pfsearch -y coils.prf MYSA_HUMAN
 #----------------------------------------------------------------------#
-  82.697   2354 pos.      848 -    1922 P13533|MYSA_HUMAN MYOSIN HEAVY CHAIN, CARDIAC MUSCLE ALPHA ISOFORM.
+ 82.697   2354 pos.    848 -  1922 P13533|MYSA_HUMAN MYOSIN HEAVY CHAIN, CARDIAC MUSCLE ALPHA ISOFORM.
 #
-# P        5 efgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefga       -7
-# S      848 EKEMATMKEEFGRIKETLEKSEARRKELEEKMVSLLQEKNDLQLQVQAEQDNLNDAEERC    -1033
+# P       5 efgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefga      -7
+# S     848 EKEMATMKEEFGRIKETLEKSEARRKELEEKMVSLLQEKNDLQLQVQAEQDNLNDAEERC   -1033
 #
-# P        2 bcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcde       -3
-# S      908 DQLIKNKIQLEAKVKEMNERLEDEEEMNAELTAKKRKLEDECSELKKDIDDLELTLAKVE     -973
+# P       2 bcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcde      -3
+# S     908 DQLIKNKIQLEAKVKEMNERLEDEEEMNAELTAKKRKLEDECSELKKDIDDLELTLAKVE    -973
 #
-# P        6 fgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgab       -6
-# S      968 KEKHATENKVKNLTEEMAGLDEIIAKLTKEKKALQEAHQQALDDLQAEEDKVNTLSKSKV     -913
+# P       6 fgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgab      -6
+# S     968 KEKHATENKVKNLTEEMAGLDEIIAKLTKEKKALQEAHQQALDDLQAEEDKVNTLSKSKV    -913
 #
-# P        3 cdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdef       -2
-# S     1028 KLEQQVDDLEGSLEQEKKVRMDLERAKRKLEGDLKLTQESIMDLENDKLQLEEKLKKKEF     -853
+# P       3 cdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdef      -2
+# S    1028 KLEQQVDDLEGSLEQEKKVRMDLERAKRKLEGDLKLTQESIMDLENDKLQLEEKLKKKEF    -853
 #
-# P        7 gabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabc       -5
-# S     1088 DINQQNSKIEDEQVLALQLQKKLKENQARIEELEEELEAERTARAKVEKLRSDLSRELEE     -793
+# P       7 gabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabc      -5
+# S    1088 DINQQNSKIEDEQVLALQLQKKLKENQARIEELEEELEAERTARAKVEKLRSDLSRELEE    -793
 #
-# P        4 defgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefga-bcdefgabcdef       -2
-# S     1148 ISERLEEAGGATSVQIEMNKKREAEFQKMRRDLEEATLQHEATAAALrKKHADSVAELGE     -733
+# P       4 defgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefga-bcdefgabcdef      -2
+# S    1148 ISERLEEAGGATSVQIEMNKKREAEFQKMRRDLEEATLQHEATAAALrKKHADSVAELGE    -733
 #
-# P        7 gabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabc       -5
-# S     1208 QIDNLQRVKQKLEKEKSEFKLELDDVTSNMEQIIKAKANLEKVSRTLEDQANEYRVKLEE     -673
+# P       7 gabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabc      -5
+# S    1208 QIDNLQRVKQKLEKEKSEFKLELDDVTSNMEQIIKAKANLEKVSRTLEDQANEYRVKLEE    -673
 #
-# P        4 defgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefg       -1
-# S     1268 AQRSLNDFTTQRAKLQTENGELSRQLEEKEALISQLTRGKLSYTQQMEDLKRQLEEEGKA     -613
+# P       4 defgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefg      -1
+# S    1268 AQRSLNDFTTQRAKLQTENGELSRQLEEKEALISQLTRGKLSYTQQMEDLKRQLEEEGKA    -613
 #
-# P        1 abcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgab-cdefgabc       -5
-# S     1328 KNALAHALQSARHDCDLLREQYEEETEAKAELQRVLSKANSEVAQCRTKYEtDAIQRTEE     -553
+# P       1 abcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgab-cdefgabc      -5
+# S    1328 KNALAHALQSARHDCDLLREQYEEETEAKAELQRVLSKANSEVAQCRTKYEtDAIQRTEE    -553
 #
-# P        4 defgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefg       -1
-# S     1388 LEEAKKKLAQRLQDAEEAVEAVNAKCSSLEKTKHRLQNEIEDLMVDVERSNAAAAALDKK     -493
+# P       4 defgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefg      -1
+# S    1388 LEEAKKKLAQRLQDAEEAVEAVNAKCSSLEKTKHRLQNEIEDLMVDVERSNAAAAALDKK    -493
 #
-# P        1 abcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcd       -4
-# S     1448 QRNFDKILAEWKQKYEESQSELESSQKEARSLSTELFKLKNAYEESLEHLETFKRENKNL     -433
+# P       1 abcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcd      -4
+# S    1448 QRNFDKILAEWKQKYEESQSELESSQKEARSLSTELFKLKNAYEESLEHLETFKRENKNL    -433
 #
-# P        5 efgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefga       -7
-# S     1508 QEEISDLTEQLGEGGKNVHELEKVRKQLEVEKLELQSALEEAEASLEHEEGKILRAQLEF     -373
+# P       5 efgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefga      -7
+# S    1508 QEEISDLTEQLGEGGKNVHELEKVRKQLEVEKLELQSALEEAEASLEHEEGKILRAQLEF    -373
 #
-# P        2 bcdefgabc-defgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcd       -4
-# S     1568 NQIKAEIERkLAEKDEEMEQAKRNHQRVVDSLQTSLDAETRSRNEVLRVKKKMEGDLNEM     -313
+# P       2 bcdefgabc-defgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcd      -4
+# S    1568 NQIKAEIERkLAEKDEEMEQAKRNHQRVVDSLQTSLDAETRSRNEVLRVKKKMEGDLNEM    -313
 #
-# P        5 efgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefga       -7
-# S     1628 EIQLSHANRMAAEAQKQVKSLQSLLKDTQIQLDDAVRANDDLKENIAIVERRNNLLQAEL     -253
+# P       5 efgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefga      -7
+# S    1628 EIQLSHANRMAAEAQKQVKSLQSLLKDTQIQLDDAVRANDDLKENIAIVERRNNLLQAEL    -253
 #
-# P        2 bcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcde       -3
-# S     1688 EELRAVVEQTERSRKLADRELIETSERVQLLHSQNTSLINQKKKMDADLSQLQSEVEEAV     -193
+# P       2 bcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcde      -3
+# S    1688 EELRAVVEQTERSRKLADRELIETSERVQLLHSQNTSLINQKKKMDADLSQLQSEVEEAV    -193
 #
-# P        6 fgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdef-ga       -7
-# S     1748 QECRNAEEKAKKAITHAAMMAEELKKEQDTSAHLERMKKNMEQTIKDLQHRLDEAEQiAL     -133
+# P       6 fgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdef-ga      -7
+# S    1748 QECRNAEEKAKKAITHAAMMAEELKKEQDTSAHLERMKKNMEQTIKDLQHRLDEAEQiAL    -133
 #
-# P        2 bcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcde       -3
-# S     1808 KGGKKQLQKLEARVRELEGELEAEQKRNAESVKGMRKSERRIKELTYQTEEDKKNLLRLQ      -73
+# P       2 bcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcde      -3
+# S    1808 KGGKKQLQKLEARVRELEGELEAEQKRNAESVKGMRKSERRIKELTYQTEEDKKNLLRLQ     -73
 #
-# P        6 fgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcd       -4 
-# S     1868 DLVDKLQLKVKAYKRQAEEAEEQANTNLSKFRKVQHELDEAEERADIAESQVNKL      -18 
+# P       6 fgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcdefgabcd      -4 
+# S    1868 DLVDKLQLKVKAYKRQAEEAEEQANTNLSKFRKVQHELDEAEERADIAESQVNKL     -18 
 #
 #----------------------------------------------------------------------#
 # pftools test 11: /bin/rm sh3.fsp
-#                 ./ptof -r -F -1.2 -I 0.6 -X -1.5 -B -0.5 sh3.prf >sh3.fsp
-#                 ./2ft < R76849.seq | ./pfsearch -fy -C 5.0 sh3.fsp -
+#                 ./ptof -r sh3.prf F=-1.2 I=0.6 X=-1.5 B=-0.5 >sh3.fsp
+#                 ./2ft < R76849.seq | ./pfsearch -fy  sh3.fsp - C=5.0
 #                  /bin/rm sh3.fsp
 #----------------------------------------------------------------------#
-  10.764    600 pos.      186 -     347 x|gi|851481|gb|R76849|R76849_M yi63d09.r1 Homo sapiens cDNA clone 143921 5' similar to gb:M23379 GTPASE-ACTIVATING PROTEIN (HUMAN);.
+ 10.764    600 pos.    186 -   347 x|gi|851481|gb|R76849|R76849_M yi63d09.r1 Homo sapiens cDNA clone 143921 5' similar to gb:M23379 
 #
-# P       28 Y><D><Y><E>----<A><E><D><P><D><E><L><S><F>-<K><K><G><D><I><I     -103
-# S      186 YTPPLLYTHTQkkksVYTPPQRDTHTLODMOEKNIOKSVFFSpLLOKKKRGERDIYMCVF     -253
+# P      28 Y><D><Y><E>----<A><E><D><P><D><E><L><S><F>-<K><K><G><D><I><I    -103
+# S     186 YTPPLLYTHTQkkksVYTPPQRDTHTLODMOEKNIOKSVFFSpLLOKKKRGERDIYMCVF    -253
 #
-# P       83 ><Y><I><L><E><K><S><D><D><D><W><W><R><G><R><N><X><R><T><G><Q      -43
-# S      246 SHILCVFSHIONMOENILOREKRDMWGDMWGDMCVWGGVLYTQKNIFLOKRENTQRDMOE     -193
+# P      83 ><Y><I><L><E><K><S><D><D><D><W><W><R><G><R><N><X><R><T><G><Q     -43
+# S     246 SHILCVFSHIONMOENILOREKRDMWGDMWGDMCVWGGVLYTQKNIFLOKRENTQRDMOE    -193
 #
-# P      143 ><E><G><Y><I><P><S><N><Y><V><E><E><X><D><S       -1 
-# S      306 NTQKRGAPLLYILCVLOEKRDTPLOSVOREKRERGVWGGAPR     -151 
+# P     143 ><E><G><Y><I><P><S><N><Y><V><E><E><X><D><S      -1 
+# S     306 NTQKRGAPLLYILCVLOEKRDTPLOSVOREKRERGVWGGAPR    -151 
 #
diff --git a/test.sh b/data/test.sh
similarity index 69%
rename from test.sh
rename to data/test.sh
index 5af3824..b7c4852 100644
--- a/test.sh
+++ b/data/test.sh
@@ -1,8 +1,8 @@
 #!/bin/sh
 echo "#----------------------------------------------------------------------#"
-echo "# pftools test 1: ./pfsearch -f -C 6.0 sh3.prf sh3.seq"
+echo "# pftools test 1: ./pfsearch -f sh3.prf sh3.seq C=6.0"
 echo "#----------------------------------------------------------------------#"
-./pfsearch -f -C 6.0 sh3.prf sh3.seq
+./pfsearch -f sh3.prf sh3.seq C=6.0
 echo "#----------------------------------------------------------------------#"
 echo "# pftools test 2: ./pfsearch -bx ecp.prf CVPBR322 | ./psa2msa -du"
 echo "#----------------------------------------------------------------------#"
@@ -12,43 +12,43 @@ echo "# pftools test 3: ./pfscan -s GTPA_HUMAN prosite13.prf"
 echo "#----------------------------------------------------------------------#"
 ./pfscan -s GTPA_HUMAN prosite13.prf
 echo "#----------------------------------------------------------------------#"
-echo "# pftools test 4: ./pfscan -by -C 2 CVPBR322 ecp.prf"
+echo "# pftools test 4: ./pfscan -by CVPBR322 ecp.prf L=2"
 echo "#----------------------------------------------------------------------#"
-./pfscan -by -C 2 CVPBR322 ecp.prf
+./pfscan -by CVPBR322 ecp.prf L=2
 echo "#----------------------------------------------------------------------#"
-echo "# pftools test 5: ./gtop -F 50 sh3.gpr | ./pfsearch -far - sh3.seq"
+echo "# pftools test 5: ./gtop sh3.gpr F=50 | ./pfsearch -far - sh3.seq"
 echo "#                    | sort -nr"
 echo "#----------------------------------------------------------------------#"
-./gtop -F 50 sh3.gpr | ./pfsearch -far - sh3.seq | sort -nr
+./gtop sh3.gpr F=50 | ./pfsearch -far - sh3.seq | sort -nr
 echo "#----------------------------------------------------------------------#"
 echo "# pftools test 6: ./htop pfam_sh3.hmm  | ./pfsearch -f - sh3.seq"
 echo "                     | sort -nr"
 echo "#----------------------------------------------------------------------#"
 ./htop pfam_sh3.hmm | ./pfsearch -f - sh3.seq | sort -nr
 echo "#----------------------------------------------------------------------#"
-echo "# pftools test 7: ./pfw -N 1000 sh3.msf |"
-echo "#                    ./pfmake -b -H 0.6 - blosum45.cmp"
+echo "# pftools test 7: ./pfw sh3.msf N=1000 |"
+echo "#                    ./pfmake -b - blosum45.cmp H=0.6"
 echo "#----------------------------------------------------------------------#"
-./pfw -N 1000 sh3.msf | ./pfmake -b -H 0.6 - blosum45.cmp
+./pfw sh3.msf N=1000 | ./pfmake -b - blosum45.cmp H=0.6
 echo "#----------------------------------------------------------------------#"
-echo "# pftools test 8:./ptoh -L 1.15 ecp.prf"
+echo "# pftools test 8:./ptoh ecp.prf L=1.15"
 echo "#----------------------------------------------------------------------#"
-./ptoh -L 1.15 ecp.prf
+./ptoh ecp.prf L=1.15
 echo "#----------------------------------------------------------------------#"
-echo "# pftools test 9: ./pfscale -N 14147368 -P 0.0001 -Q 0.000001 score.lis"
-echo "#                    | sed -n 1,25p"
+echo "# pftools test 9: ./pfscale score.lis N=14147368 P=0.0001"
+echo "#                    Q=0.000001 | sed -n 1,25p"
 echo "#----------------------------------------------------------------------#"
-./pfscale -N 14147368 -P 0.0001 -Q 0.000001 score.lis | sed -n 1,25p
+./pfscale score.lis N=14147368 P=0.0001 Q=0.000001 | sed -n 1,25p
 echo "#----------------------------------------------------------------------#"
 echo "# pftools test 10: ./pfsearch -y coils.prf MYSA_HUMAN"
 echo "#----------------------------------------------------------------------#"
 ./pfsearch -y coils.prf MYSA_HUMAN
 echo "#----------------------------------------------------------------------#"
 echo "# pftools test 11: /bin/rm sh3.fsp"
-echo "#                 ./ptof -r -F -1.2 -I 0.6 -X -1.5 -B -0.5 sh3.prf >sh3.fsp"
-echo "#                 ./2ft < R76849.seq | ./pfsearch -fy -C 5.0 sh3.fsp -"
+echo "#                 ./ptof -r sh3.prf F=-1.2 I=0.6 X=-1.5 B=-0.5 >sh3.fsp"
+echo "#                 ./2ft < R76849.seq | ./pfsearch -fy  sh3.fsp - C=5.0"
 echo "#                  /bin/rm sh3.fsp"
 echo "#----------------------------------------------------------------------#"
-/bin/rm sh3.fsp; ./ptof -r -F -1.2 -I 0.6 -X -1.5 -B -0.5 sh3.prf > sh3.fsp ; ./2ft < R76849.seq | ./pfsearch -fy -C 5.0 sh3.fsp -; /bin/rm sh3.fsp
+/bin/rm sh3.fsp; ./ptof -r sh3.prf F=-1.2 I=0.6 X=-1.5 B=-0.5 > sh3.fsp ; ./2ft < R76849.seq | ./pfsearch -fy  sh3.fsp - C=5.0; /bin/rm sh3.fsp
 
 
diff --git a/depcomp b/depcomp
new file mode 100755
index 0000000..df8eea7
--- /dev/null
+++ b/depcomp
@@ -0,0 +1,630 @@
+#! /bin/sh
+# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2009-04-28.21; # UTC
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 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, see <http://www.gnu.org/licenses/>.
+
+# 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
+
+cygpath_u="cygpath -u -f -"
+if test "$depmode" = msvcmsys; then
+   # This is just like msvisualcpp but w/o cygpath translation.
+   # Just convert the backslash-escaped backslashes to single forward
+   # slashes to satisfy depend.m4
+   cygpath_u="sed s,\\\\\\\\,/,g"
+   depmode=msvisualcpp
+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 "X$1" != 'X--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 "X$1" != 'X--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+  # X makedepend
+  shift
+  cleared=no eat=no
+  for arg
+  do
+    case $cleared in
+    no)
+      set ""; shift
+      cleared=yes ;;
+    esac
+    if test $eat = yes; then
+      eat=no
+      continue
+    fi
+    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.
+    -arch)
+      eat=yes ;;
+    -*|$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 "X$1" != 'X--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.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test "X$1" != 'X--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  IFS=" "
+  for arg
+  do
+    case "$arg" in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+	set fnord "$@"
+	shift
+	shift
+	;;
+    *)
+	set fnord "$@" "$arg"
+	shift
+	shift
+	;;
+    esac
+  done
+  "$@" -E 2>/dev/null |
+  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::	\1 \\:p' >> "$depfile"
+  echo "	" >> "$depfile"
+  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+msvcmsys)
+  # 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
+  ;;
+
+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-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/profile.txt b/doc/profile.txt
similarity index 100%
rename from profile.txt
rename to doc/profile.txt
diff --git a/install-sh b/install-sh
new file mode 100755
index 0000000..6781b98
--- /dev/null
+++ b/install-sh
@@ -0,0 +1,520 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2009-04-28.21; # UTC
+
+# 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-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/install_pftools.sh b/install_pftools.sh
deleted file mode 100755
index 3e4c899..0000000
--- a/install_pftools.sh
+++ /dev/null
@@ -1,228 +0,0 @@
-#! /usr/bin/env bash
-#
-# $Id: install_pftools.sh,v 1.4 2003/09/22 15:17:03 vflegel Exp $
-#
-# This shell script installs all components of the pftools package into
-# the specified directories.
-#
-# Usage: install_pftools.sh <baseDirectory>
-#
-# Description: The script will copy the package components into a given
-#              base directory. This directory is given as a command line
-#              parameter of the shell script, but may be redefined through
-#              user input. It then makes links to the executables in
-#              a user defined bin directory as well as links to the man pages
-#              in a user specified man directory.
-#
-# Author:      Volker Flegel
-# Email:       pftools at isb-sib.ch
-#
-# Date:        May 2003
-#
-
-# Get program name
-prgName=`basename "$0"`
-
-# Helper functions
-Usage () {
-  echo "$prgName - install the pftools package, man pages and executables.
-
-Usage: $prgName <baseDirectory>
-    baseDirectory   directory where the pftools orginal files should be \
-installed.
-
-" >&2
-  exit 1
-}
-
-Msg () {
-  echo
-  for MsgLine
-    do echo "$prgName: $MsgLine" >&2
-  done
-}
-
-Fatal () { Msg "$@"; exit 1; }
-
-# Check command line arguments
-if [ $# != 1 ]; then
-  Usage
-fi
-
-# Set command variables
-rmCmd=`which rm`
-cpCmd=`which cp`
-
-# Set package directories
-pkgDir="$1"
-binDir="/usr/bin/"
-manDir="/usr/man/"
-
-# Inform user about script action
-echo
-echo "This will install the pftools package and components into their"
-echo "respective directories."
-echo
-echo "Make sure you have write permissions on the different installation directories."
-echo
-
-# Get package directory
-echo -n "Where should the pftools package be installed ? [ $pkgDir ] "
-read userInput
-pkgDir=${userInput:-$pkgDir}
-
-# Get binary directory
-echo -n "Where should the pftools executables be installed ? [ $binDir ] "
-read userInput
-binDir=${userInput:-$binDir}
-
-# Get man page directory
-echo -n "Where should the pftools man pages be installed ? [ $manDir ] "
-read userInput
-manDir=${userInput:-$manDir}
-
-# Test and remove package directory
-if [ -d $pkgDir ]; then
-  echo
-  echo "Package directory $pkgDir already exists."
-  echo "Please choose another destination."
-#  echo "Overwrite directory $pkgDir ? [ y/n ] "
-#  read -s -n 1 userInput
-#  if [ "$userInput" == 'y' ]; then
-#    echo -n " Removing directory $pkgDir ... "
-#    $rmCmd -rf $pkgDir 2>/dev/null || Fatal "Failed to remove $pkgDir";
-#    echo "OK"
-#  else
-    Fatal "... aborting."
-#  fi
-fi
-
-# Create package directory
-echo
-echo -n " Creating directory $pkgDir ... "
-mkdir -p $pkgDir 2>/dev/null || Fatal "Failed to create $pkgDir";
-echo "OK"
-
-# Create package subdirectory
-for subDir in bin man; do
-  echo -n " Creating directory ${pkgDir}/${subDir} ... "
-  mkdir -p ${pkgDir}/${subDir} 2>/dev/null || Fatal "Failed to create ${pkgDir}/${subDir}";
-  echo "OK"
-done
-
-
-# Test and create binary directory
-if [ ! -d $binDir ]; then
-  echo
-  echo "Binary directory $binDir does not exist."
-  echo "Create directory $binDir ? [ y/n ] "
-  read -s -n 1 userInput
-  if [ "$userInput" == 'y' ]; then
-    echo -n " Creating directory $binDir ... "
-    mkdir -p $binDir 2>/dev/null || Fatal "Failed to create $binDir";
-    echo "OK"
-  else
-    Fatal "... aborting."
-  fi
-fi  
-
-# Test and create man directory
-if [ ! -d $manDir ]; then
-  echo
-  echo "Man page directory $manDir does not exist."
-  echo "Create directory $manDir ? [ y/n ] "
-  read -s -n 1 userInput
-  if [ "$userInput" == 'y' ]; then
-    echo -n " Creating directory $manDir ... "
-    mkdir -p $manDir 2>/dev/null || Fatal "Failed to create $manDir";
-    echo "OK"
-  else
-    Fatal "... aborting."
-  fi
-fi
-
-# Test and create man1 and man5 directories
-for subDir in ${manDir}/man1 ${manDir}/man5; do
-  if [ ! -d $subDir ]; then
-    echo -n " Creating directory $subDir ... "
-    mkdir -p $subDir 2>/dev/null || Fatal "Failed to create $subDir";
-    echo "OK"
-  fi
-done
-
-# Copy package files to package directory
-pkgFiles="CVPBR322 GTPA_HUMAN MYSA_HUMAN coils.prf pam220.cmp score.lis ecp.prf pam250.cmp sh3.gpr \
-R76849.seq gonnet.cmp pam30.cmp sh3.msf blosum100.cmp pam40.cmp sh3.prf \
-blosum30.cmp pam400.cmp sh3.seq blosum45.cmp pam80.cmp standard.random blosum50.cmp pfam_sh3.hmm test.out \
-blosum62.cmp pam120.cmp test.sh blosum65.cmp pam160.cmp profile.txt blosum80.cmp pam200.cmp \
-README prosite13.prf"
-
-for myFile in $pkgFiles; do
-  $cpCmd $myFile ${pkgDir}/${myFile} 2>/dev/null ||  Fatal "Failed to copy $myFile";
-done
-
-# Copy and link binary files to bin directory
-binFiles="gtop pfmake pfscan pfw ptoh htop pfscale pfsearch psa2msa 2ft 6ft ptof"
-unset allFiles
-
-for myFile in $binFiles; do
-  if ([ -e ${binDir}/${myFile} ] || [ -h ${binDir}/${myFile} ]) && [ "$allFiles" != 'a' ]; then
-    echo "Destination file '${binDir}/${myFile}' exists."
-    echo "Overwrite file '${binDir}/${myFile}' ? [ yes/no/all ] "
-    read -s -n 1 allFiles
-    if [ "$allFiles" != 'y' ] && [ "$allFiles" != 'a' ]; then
-      Fatal "Another version of $myFile exists. Aborting..."
-    fi
-  fi
-  if [ -e ${binDir}/${myFile} ] || [ -h ${binDir}/${myFile} ]; then
-    $rmCmd -f ${binDir}/${myFile} 2>/dev/null ||  Fatal "Failed to remove $myFile";
-  fi
-  $cpCmd $myFile ${pkgDir}/bin/${myFile} ||  Fatal "Failed to copy $myFile";
-  ln -s ${pkgDir}/bin/$myFile ${binDir}/${myFile} ||  Fatal "Failed to link $myFile";
-done
-
-# Copy and link man1 files to man1 directory
-manFiles="gtop.1 pfmake.1 pfscan.1 pfw.1 ptoh.1 htop.1 pfscale.1 pfsearch.1 psa2msa.1 2ft.1 6ft.1 ptof.1"
-unset allFiles
-
-for myFile in $manFiles; do
-  if ([ -e ${manDir}/man1/${myFile} ] || [ -h ${manDir}/man1/${myFile} ]) && [ "$allFiles" != 'a' ]; then
-    echo "Destination file '${manDir}/man1/${myFile}' exists."
-    echo "Overwrite file '${manDir}/man1/${myFile}' ? [ yes/no/all ] "
-    read -s -n 1 allFiles
-    if [ "$allFiles" != 'y' ] && [ "$allFiles" != 'a' ]; then
-      Fatal "Another version of $myFile exists. Aborting..."
-    fi
-  fi
-  if [ -e ${manDir}/man1/${myFile} ] || [ -h ${manDir}/man1/${myFile} ]; then
-    $rmCmd -f ${manDir}/man1/${myFile} 2>/dev/null ||  Fatal "Failed to remove $myFile";
-  fi
-  $cpCmd man/$myFile ${pkgDir}/man/${myFile} 2>/dev/null ||  Fatal "Failed to copy $myFile";
-  ln -s ${pkgDir}/man/$myFile ${manDir}/man1/${myFile} 2>/dev/null ||  Fatal "Failed to link $myFile";
-done
-
-# Copy and link man5 files to man5 directory
-manFiles=" psa.5 xpsa.5"
-unset allFiles
-
-for myFile in $manFiles; do
-  if ([ -e ${manDir}/man5/${myFile} ] || [ -h ${manDir}/man5/${myFile} ]) && [ "$allFiles" != 'a' ]; then
-    echo "Destination file '${manDir}/man5/${myFile}' exists."
-    echo "Overwrite file '${manDir}/man5/${myFile}' ? [ yes/no/all ] "
-    read -s -n 1 allFiles
-    if [ "$allFiles" != 'y' ] && [ "$allFiles" != 'a' ]; then
-      Fatal "Another version of $myFile exists. Aborting..."
-    fi
-  fi
-  if [ -e ${manDir}/man5/${myFile} ] || [ -h ${manDir}/man5/${myFile} ]; then
-    $rmCmd -f ${manDir}/man5/${myFile} 2>/dev/null ||  Fatal "Failed to remove $myFile";
-  fi
-  $cpCmd man/$myFile ${pkgDir}/man/${myFile} 2>/dev/null ||  Fatal "Failed to copy $myFile";
-  ln -s ${pkgDir}/man/$myFile ${manDir}/man5/${myFile} 2>/dev/null ||  Fatal "Failed to link $myFile";
-done
-
-echo
-echo "Installation seems successful."
-echo
-echo "Install directories: $pkgDir $binDir $manDir"
-exit 0
diff --git a/io.c b/io.c
deleted file mode 100644
index 6f48f8e..0000000
--- a/io.c
+++ /dev/null
@@ -1,15 +0,0 @@
-#include <stdio.h>
-
-int getc_(ch, ch_len)
-     char *ch;
-     int *ch_len;
-{
-  int ret_val;
-  *ch = getc(stdin);
-  if(*(unsigned char *)ch == 255) { 
-    ret_val = -1;
-  } else {
-    ret_val = -0;
-  }
-  return ret_val;
-} 
diff --git a/jprsm.f b/jprsm.f
deleted file mode 100644
index 277ed86..0000000
--- a/jprsm.f
+++ /dev/null
@@ -1,97 +0,0 @@
-*----------------------------------------------------------------------*     
-* $Id: xprsm.f,v 2.12 2003/12/09 13:42:42 vflegel Exp $
-*----------------------------------------------------------------------*     
-*       Version:  File under developpment for release 2.3
-*----------------------------------------------------------------------*     
-      Subroutine JPRSM(CHID,CHAC,CHFH,OPTF,JALB,JALE)
-
-* logical switches 
-
-      Logical           OPTF
-
-* sequence and profile header 
-      
-      Character*(*)     CHID
-      Character*(*)     CHAC
-      Character*(*)     CHFH
-
-* Output fields 
-      
-      Character*64      CHLO
-      Character*64      CHMO
-      Character*64      CHMI
-      Character*512     RCEX
-
-* prepare output fields 
-
-* - profile name (motif)
-
-      CHMO='motif= '
-      
-      L1=Lblnk(CHID)
-      L2=Lblnk(CHAC)
-      L3=6
-      If(L2-1.GT.0) then
-         CHMO=CHMO(1:L3) // CHAC(1:L2)
-         L3=L3+L2
-      End if
-      If(L1.GT.0) then
-         CHMO=CHMO(1:L3) // CHID(1:L1)
-      End if
-      If(L2-1.LE.0.AND.L1.EQ.0) then
-         CHMO=CHMO(1:6) // 'unknown'
-      End if
-
-      ILMO=Lblnk(CHMO)
-
-* - entry-ref 
-
-      If(OPTF) then
-         L1=Lblnk(CHFH)
-         If (L1.EQ.0) then
-            CHMI='unknown'
-            ILMI=7
-         Else
-            CHMI=CHFH(1:L1)
-            ILMI=MIN(64,L1)
-         Endif
-      Else
-         L1=Lblnk(CHAC)
-         L2=Lblnk(CHID)
-         CHMI=CHAC(1:L1) // CHID(1:L2)
-         ILMI=MIN(64,L1+L2)
-      End if
-
-* - location
-      Write(CHLO,*) JALB,'-',JALE
-      J1=0
-      Do I1=1,Lblnk(CHLO)
-          If(CHLO(I1:I1).NE.' ') then 
-             J1=J1+1
-             CHLO(J1:J1)=CHLO(I1:I1)
-             CHLO(I1:I1)=' '
-          End if
-      End do
-      ILLO=Lblnk(CHLO)
-
-* assemble ouput record
-
-      LNEX=0 
-
-      RCEX(LNEX+1:)='>' // CHMI 
-      LNEX=LNEX+ILMI+2
-         
-      RCEX(LNEX:)='/' // CHLO
-      LNEX=LNEX+ILLO+1
-
-      RCEX(LNEX+1:)=CHMO 
-      LNEX=LNEX+ILMO+1
-
-* Write output record
-      If(LNEX.GT.512) then
-         LNEX=512
-      End if
-      Write(6,'(512A)')(RCEX(ii1:ii1),ii1=1,LNEX)
-
- 100  Return 
-      End 
diff --git a/man/2ft.1 b/man/2ft.1
index 169d933..a9d0f5f 100644
--- a/man/2ft.1
+++ b/man/2ft.1
@@ -1,125 +1,38 @@
-.\"
-.\" $Id: 2ft.1,v 1.2 2003/08/11 12:09:14 vflegel Exp $
-.\" Copyright (c) 2003 Swiss Institute of Bioinformatics <pftools at isb-sib.ch>
-.\" Process this file with
-.\" groff -man -Tascii <name>
-.\" for ascii output or
-.\" groff -man -Tps <name>
-.\" for postscript output
-.\"
-.TH 2FT 1 "May 2003" "pftools 2.3" "pftools"
-.\" ------------------------------------------------
-.\" Name section
-.\" ------------------------------------------------
+.TH 2FT 1 "July 1999" "pftools 2.2"
 .SH NAME
 2ft \- 2-frame translation of a DNA sequence into protein 
-.\" ------------------------------------------------
-.\" Synopsis section
-.\" ------------------------------------------------
 .SH SYNOPSIS
-.TP 10
 .B 2ft
-[
-.B \-h
-] [
-.B \-r
-|
-.B \-s
-] [
-.B \-W
-.I width
-]
-.B <
-.I sequence_library
-.\" ------------------------------------------------
-.\" Description section
-.\" ------------------------------------------------
+[ -rs ] < seq-library-file
 .SH DESCRIPTION
 .B 2ft
 converts both strands of one or several DNA sequences into so-called
-.RI \(dq interleaved\ frame-translated \(dq
-DNA sequences.  An
-.RI \(dq interleaved\ frame-translated \(dq
-DNA sequence is an amino acid sequence of translated
+"interleaved frame-translated" DNA sequences. 
+An "interleaved frame-translated" DNA sequence is an amino acid sequence of translated
 overlapping codons. For instance, the DNA sequence 
 "ATGGCA" consisting of four overlapping codons would be translated into the amino acid sequence
-"MWGA", representing the translation of the 1st codon of the 1st reading frame,
-the 1st codon of the 2nd reading frame, the 1st codon of the 3rd reading frame and the 2nd codon
-of the 1st reading frame.
-Stop codons are represented by the character
-.RB \(dq O \(dq.
-The program
-.B 2ft
-reads fasta formatted DNA sequences from standard input. If the sequences
-are contained in a file, the input can be redirected from this file using the
-shell's input redirector
-.RB ' < '
-as shown in the
-.I synopsis
-section.
-The
-.I sequence_library
+"MWGA". 
+Stop codons are represented by character "O".
+.I seq-library-file
 contains one or several sequences in Pearson/Fasta format.
-.LP
+
 This program is used for searching genomic or EST sequence databases
 with frame-search profiles generated by pftools program
-.BR ptof (1).
-.\" ------------------------------------------------
-.\" Options section
-.\" ------------------------------------------------
+.B ptof.
+
 .SH OPTIONS
-.\" --- h ---
 .TP
-.B \-h
-Display usage help text.
-.\" --- r ---
+\-r 
+Translate only reversed (antisense) strand.
 .TP
-.B \-r 
-Translate only reverse (antisense) strand.
-.br
-This option is mutualy exclusive with option
-.BR \-s .
-.br
-Default: translate both strands
-.\" --- s ---
-.TP
-.B \-s
+\-s
 Translate only sense strand.
-.br
-This option is mutualy exclusive with option
-.BR \-r .
-.br
-Default: translate both strands
-.\" --- W ---
-.TP
-.BI \-W\  width
-Set sequence output width.
-.br
-The value of
-.RI ' width '
-specifies how many residues will be output on one line.
-.br
-Type: integer
-.br
-Default: 60
-.\" ------------------------------------------------
-.\" Examples section
-.\" ------------------------------------------------
 .SH EXAMPLES
+
 .I See
 manual pages of pftools program
-.BR ptof (1).
-.\" ------------------------------------------------
-.\" See also section
-.\" ------------------------------------------------
-.SH "SEE ALSO"
-.BR ptof (1)
-.\" ------------------------------------------------
-.\" Author section
-.\" ------------------------------------------------
+.B ptof.
 .SH AUTHOR
-The
-.B pftools
-package was developped by Philipp Bucher.
+Philipp Bucher
 .br
-Any comments or suggestions should be addressed to <pftools at isb-sib.ch>.
+Philipp.Bucher at isrec.unil.ch
diff --git a/man/6ft.1 b/man/6ft.1
index f79a844..5307530 100644
--- a/man/6ft.1
+++ b/man/6ft.1
@@ -1,127 +1,40 @@
-.\"
-.\" $Id: 6ft.1,v 1.2 2003/08/11 12:09:14 vflegel Exp $
-.\" Copyright (c) 2003 Swiss Institute of Bioinformatics <pftools at isb-sib.ch>
-.\" Process this file with
-.\" groff -man -Tascii <name>
-.\" for ascii output or
-.\" groff -man -Tps <name>
-.\" for postscript output
-.\"
-.TH 6FT 1 "May 2003" "pftools 2.3" "pftools"
-.\" ------------------------------------------------
-.\" Name section
-.\" ------------------------------------------------
+.TH 6FT 1 "July 1999" "pftools 2.2"
 .SH NAME
 6ft \- 6-frame translation of a DNA sequence into protein 
-.\" ------------------------------------------------
-.\" Synopsis section
-.\" ------------------------------------------------
 .SH SYNOPSIS
-.TP 10
 .B 6ft
-[
-.B \-h
-] [
-.B \-r
-|
-.B \-s
-] [
-.B \-W
-.I width
-]
-.B <
-.I sequence_library
-.\" ------------------------------------------------
-.\" Description section
-.\" ------------------------------------------------
+[ -rs ] seq-library-file
 .SH DESCRIPTION
 .B 6ft
 translates all six reading frames of a double-stranded DNA sequence into
 individual protein sequences.
-Stop codons are represented by character
-.RB \(dq O \(dq.
-The program
-.B 6ft
-reads input fasta formatted DNA sequences from standard input. If the sequences
-are contained in a file, the input can be redirected from this file using the
-shell's input redirector
-.RB ' < '
-as shown in the
-.I synopsis
-section.
-The
-.I sequence_library
+Stop codons are represented by character "O".
+.I seq-library-file
 contains one or several sequences in Pearson/Fasta format.
-.LP
+
 This program may be used for searching genomic or EST sequence databases
 with a protein profile. Better results are usually obtained by first
 converting the protein profile into a frame-search profile, and then
 searching a 2-frame translation of the DNA sequence database generated with
 pftools program
-.BR 2ft (1), 
+.B 2ft, 
 .I see
-manual pages of pftools programs 
-.BR ptof (1)
+manual pages of pftool programs 
+.B ptof
 and  
-.BR 2ft (1).
-.\" ------------------------------------------------
-.\" Options section
-.\" ------------------------------------------------
+.B 2ft.
 .SH OPTIONS
-.\" --- h ---
 .TP
-.B \-h
-Display usage help text.
-.\" --- r ---
+\-r 
+Translate only reversed (antisense) strand.
 .TP
-.B \-r 
-Translate only reverse (antisense) strand.
-.br
-This option is mutualy exclusive with option
-.BR \-s .
-.br
-Default: translate both strands
-.\" --- s ---
-.TP
-.B \-s
+\-s
 Translate only sense strand.
-.br
-This option is mutualy exclusive with option
-.BR \-r .
-.br
-Default: translate both strands
-.\" --- W ---
-.TP
-.BI \-W\  width
-Set sequence output width.
-.br
-The value of
-.RI ' width '
-specifies how many residues will be output on one line.
-.br
-Type: integer
-.br
-Default: 60
-.\" ------------------------------------------------
-.\" Examples section
-.\" ------------------------------------------------
 .SH EXAMPLES
 .I See
 manual pages of pftools program
-.BR ptof (1).
-.\" ------------------------------------------------
-.\" See also section
-.\" ------------------------------------------------
-.SH "SEE ALSO"
-.BR ptof (1),
-.BR pfsearch (1),
-.BR pfscan (1)
-.\" ------------------------------------------------
-.\" Author section
-.\" ------------------------------------------------
+.B ptof.
 .SH AUTHOR
-The
-.B pftools
-package was developped by Philipp Bucher.
+Philipp Bucher
 .br
-Any comments or suggestions should be addressed to <pftools at isb-sib.ch>.
+Philipp.Bucher at isrec.unil.ch
diff --git a/man/gtop.1 b/man/gtop.1
index d4886e6..9a95e18 100644
--- a/man/gtop.1
+++ b/man/gtop.1
@@ -1,261 +1,87 @@
-.\"
-.\" $Id: gtop.1,v 1.1 2003/05/12 11:50:03 vflegel Exp $
-.\" Copyright (c) 2003 Swiss Institute of Bioinformatics <pftools at isb-sib.ch>
-.\" Process this file with
-.\" groff -man -Tascii <name>
-.\" for ascii output or
-.\" groff -man -Tps <name>
-.\" for postscript output
-.\"
-.TH GTOP 1 "April 2003" "pftools 2.3" "pftools"
-.\" ------------------------------------------------
-.\" Name section
-.\" ------------------------------------------------
+.TH GTOP 1 "February 1998" "pftools 2.2"
 .SH NAME
-gtop \- convert a profile in 
-.SM GCG
-format into
-.SM PROSITE
-format  
-.\" ------------------------------------------------
-.\" Synopsis section
-.\" ------------------------------------------------
+gtop \- convert a profile in GCG format into PROSITE format  
+
 .SH SYNOPSIS
-.TP 10
 .B gtop
-[
-.B \-ahls
-] [
-.B \-E
-.I gap_extend
-] [
-.B \-F
-.I rescale
-] [
-.B \-G
-.I gap_open
-] [
-.B \-O
-.I offset
-]
-.I gcg_profile
-|
-.B \-
-[
-.I parameters
-]
-.\" ------------------------------------------------
-.\" Description section
-.\" ------------------------------------------------
+[ -as ] [ gcg-profile ]   [G=#] [E=#] [F=#] [O=#] 
 .SH DESCRIPTION
 .B gtop
-converts a profile generated by the
-.SM GCG
-program 
-.BR ProfileMake ,
-or by a
-.SM GCG
-compatible profile construction program,
-into 
-.SM PROSITE
-format, and optionally
+converts a profile generated by the GCG program 
+.B ProfileMake\c
+\&,
+or by a GCG-compatible profile construction program,
+into PROSITE format, and optionally
 rescales the profile. 
 The result is written to the standard output. 
 On input, 
 .B gtop
-divides all weights of the profile by 100, as
-.SM GCG
-programs do.
+divides all weights of the profile by 100, as GCG programs do.
 On output, profile scores are multiplied by the rescaling factor
 .I F
 and rounded to the nearest integer. 
 If symmetric gap weighting mode is chosen, the gap opening weights 
 are divided 
-by 2 and assigned to the 
-.IR MI , \ MD , \ IM ,
-and
-.I DM
-transition scores.
+by 2 and assigned to the MI, MD, IM, and DM transition scores.
 If asymmetric gap weighting mode is chosen, the gap opening weights
-are left unchanged and assigned to the
-.I MI
-and
-.I MD
-transition scores only.
-If no argument is specified, the program attempts to read the
-.SM GCG
-formatted profile from the standard input.
-.\" ------------------------------------------------
-.\" Options section
-.\" ------------------------------------------------
+are left unchanged and assigned to the MI and MD transition scores only.
+If no argument is specified, the program attempts to read the GCG-formatted
+profile from the standard input.
 .SH OPTIONS
-.\" --- gcg_profile ---
 .TP
-.I gcg_profile
-Input
-.SM GCG
-profile.
-If the filename is replaced by a
-.RB ' \- ',
-.B gtop
-will read the input profile from
-.BR stdin .
-.\" --- a ---
-.TP
-.B \-a
-Apply asymmetric gap weighting mode (see the
-.I description
-section).
-.\" --- h ---
-.TP
-.B \-h
-Display usage help text.
-.\" --- l ---
-.TP
-.B \-l
-Remove output line length limit. Individual lines of the output profile
-can exceed a length of 132 characters, removing the need to wrap them over several lines. 
-.\" --- s ---
-.TP
-.B \-s
-Apply symmetric gap weighting mode (default) (see the
-.I description
-section).
-.\" --- E ---
+\-a
+Apply asymmetric gap weighting mode.
 .TP
-.BI \-E\  gap_extend
-Gap extension penalty.
-.br
-Default: 0.05
-.\" --- F ---
-.TP
-.BI \-F\  rescale
-Score rescaling factor.
-.br
-Default: 100
-.\" --- G ---
-.TP
-.BI \-G\  gap_open
-Gap opening penalty.
-.br
-Default: 4.5
-.\" --- O ---
-.TP
-.BI \-O\  offset
-Output score offset. This value is added to all profile match scores
-after multiplication by the rescaling factor
-.IR F .
-.br
-Default: 0
-.\" ------------------------------------------------
-.\" Parameters section
-.\" ------------------------------------------------
+\-s
+Apply symmetric gap weighting mode (default).
 .SH PARAMETERS
 .TP
-Note:
-for backwards compatibility, release 2.3 of the
-.B pftools
-package will parse the version 2.2 style parameters, but these are
-.I deprecated
-and the corresponding option (refer to the
-.I options
-section) should be used instead.
+G=#
+Gap opening penalty. Default: G=4.5.
 .TP
 E=#
-Gap extension penalty.
-.br
-Use option
-.B \-E
-instead.
+Gap extension penalty. Default: E=0.05. 
 .TP
 F=#
-Output score rescaling factor.
-.br
-Use option
-.B \-F
-instead.
-.TP
-G=#
-Gap opening penalty.
-.br
-Use option
-.B \-G
-instead.
+Rescaling factor. Default: F=100.
 .TP
 O=#
-Output score offset.
-.br
-Use option
-.B \-O
-instead.
-.\" ------------------------------------------------
-.\" Examples section
-.\" ------------------------------------------------
+Output score offset. This value is added to all profile match scores
+after multiplication by the rescaling factor
+.I F.
+Default: O=0.
 .SH EXAMPLES
 .TP
 (1)
 .B gtop
--G 1.0 -E 1.0 -F 50 sh3.gpr | 
+sh3.gpr G=1.0 E=1.0 F=50 | 
 .B pfsearch
 -far - sh3.seq | 
 .B sort
 -nr
-.IP
-First converts the
-.SM GCG
-profile
-.RI ' sh3.gpr '
-into
-.SM PROSITE
-format,
-then searches the protein library
-.RI ' sh3.seq '
-with the reformatted profile 
+ 
+First converts the GCG-formatted profile in sh3.gpr into PROSITE format,
+then searches the protein library sh3.seq with the reformatted profile 
 to generate a sorted list of optimal alignment scores.
-The
-.BR pfsearch (1)
-option
-.B \-r
+The option
+.I -r
 causes alignment scores to be expressed in raw score units. 
-.RI ' sh3.seq '
-contains 20 SH3 domain-containing protein sequences from
-.SM SWISS-PROT
+sh3.seq contains 20 SH3 domain-containing protein sequences from SWISS-PROT
 release 32.
-.\" ------------------------------------------------
-.\" Exit code section
-.\" ------------------------------------------------
-.SH EXIT CODE
-.LP
-On successful completion of its task,
-.B gtop
-will return an exit code of 0. If an error occurs, a diagnostic message will be
-output on standard error and the exit code will be different from 0. When conflicting
-options where passed to the program but the task could nevertheless be completed, warnings
-will be issued on standard error.
-.\" ------------------------------------------------
-.\" Bugs section
-.\" ------------------------------------------------
+
+.I See
+also manual pages of
+.B pfsearch
+and UNIX command
+.B sort.
 .SH BUGS
 .B gtop
 defines 
-.I SCORE=0; N_SCORE=0;
+.I "SCORE=0; N_SCORE=0;" 
 for the mandatory cut-off level zero. These parameters should be changed 
 to more reasonable values using a text editor, prior to profile search
 operations.
-.\" ------------------------------------------------
-.\" See also section
-.\" ------------------------------------------------
-.SH "SEE ALSO"
-.BR pfsearch (1),
-.BR pfscan (1),
-.BR pfmake (1),
-.BR sort (1)
-.\" ------------------------------------------------
-.\" Author section
-.\" ------------------------------------------------
 .SH AUTHOR
-The
-.B pftools
-package was developped by Philipp Bucher.
-.br
-Any comments or suggestions should be addressed to <pftools at isb-sib.ch>.
+.nf
+Philipp Bucher
+Philipp.Bucher at isrec.unil.ch
diff --git a/man/htop.1 b/man/htop.1
index 5d7bd34..99d28c6 100644
--- a/man/htop.1
+++ b/man/htop.1
@@ -1,375 +1,130 @@
-.\"
-.\" $Id: htop.1,v 1.2 2003/11/18 10:54:42 vflegel Exp $
-.\" Copyright (c) 2003 Swiss Institute of Bioinformatics <pftools at isb-sib.ch>
-.\" Process this file with
-.\" groff -man -Tascii <name>
-.\" for ascii output or
-.\" groff -man -Tps <name>
-.\" for postscript output
-.\"
-.TH HTOP 1 "May 2003" "pftools 2.3" "pftools"
-.\" ------------------------------------------------
-.\" Name section
-.\" ------------------------------------------------
+.TH HTOP 1 "July 1999" "pftools 2.2"
 .SH NAME
-htop \- convert a
-.SM HMMER
-ASCII-formatted HMM into an equivalent
-.SM PROSITE
-profile  
-.\" ------------------------------------------------
-.\" Synopsis section
-.\" ------------------------------------------------
+htop \- convert a HMMER ASCII-formatted HMM into an equivalent profile  
 .SH SYNOPSIS
-.TP 10
-.B htop
-[
-.B \-fhilos
-] [
-.B \-B
-.I norm_logbase
-] [
-.B \-C
-.I cut_off
-] [
-.B \-F
-.I multiplier
-] [
-.B \-H
-.I init/term_score
-] [
-.B \-L
-.I score_logbase
-] [
-.B \-M
-.I nb_unprotect
-] [
-.B \-P
-.I percent_unprotect
-] [
-.B \-Q
-.I odds_ratio
-]
-.I hmm_file
-|
-.B \-
-[
-.I random_model
-] [
-.I parameters
-]
-.\" ------------------------------------------------
-.\" Description section
-.\" ------------------------------------------------
+.LP
+.nf
+\fBhtop\fP [ -fios ] [ hmm-file | - ] [ random-model-file ] [B=#]
+        [C=#] [F=#] [H=#] [L=#] [M=#] [P=#] [Q=#] 
+.fi
 .SH DESCRIPTION
 .B htop
-converts a hidden Markov model (HMM) into an equivalent
-.SM PROSITE
-formatted generalized profile. The input
-.I hmm_file
-is a nucleic acid or protein HMM in
-.SM HMMER
-ASCII-format. The
-.I random_model
-file contains a simple null-model in the format used by the HMM search programs
-of the
-.SM HMMER1
-package.
-This random model is only effective in conjunction with the 
-.B \-o
-option (old
-.SM HMMER1 
-format). If omitted, a random model consisting of the 
+converts a hidden Markov model (HMM) into an equivalent PROSITE-formatted generalized profile. 
+.I hmm-file
+is a nucleic acid or protein HMM in HMMER ascii-format.
+.I random-model-file
+contains a simple null-model in the format used by the HMM search programs
+of the HMMER1 package.
+This parameter is only effective in conjunction with the 
+\-b option. If omitted, a random model consisting of the 
 average residue probabilities of the insert states will be used.
-.\" ------------------------------------------------
-.\" Options section
-.\" ------------------------------------------------
 .SH OPTIONS 
-.\" --- hmm_file ---
 .TP
-.I hmm_file
-Input HMM ASCII-file. By default,
-.B htop
-expects a
-.SM HMMER2
-formatted HMM. If the option
-.B \-o
-is set, the file should be in
-.SM HMMER1
-ASCII format.
-If the filename is replaced by a
-.RB ' \- ',
-.B htop
-will read the input HMM from
-.BR stdin .
-.\" --- random_model ---
-.TP
-.I random_model
-Input random model file. Only used in conjunction with
-.SM HMMER1
-HMMs (see option
-.BR \-o ).
-This file should contain a simple null-model using the same residue alphabet as
-the
-.IR hmm_file .
-.\" --- f ---
-.TP
-.B \-f
-Emulate HMM fragment search (only effective with old
-.SM HMMER1
-format).
-When given as input to the
-.B pftools
-programs
-.BR pfsearch (1) 
+\-f
+Emulate HMM fragment search (only effective with old HMMER1 format).
+When given as input to the pftools programs
+.B pfsearch 
 or
-.BR pfscan (1),
+.B pfscan,
 the resulting profile will behave like the original HMM searched with 
-the 
-.SM HMMER1
-program 
-.BR hmmfs . 
-The default mode is to emulate HMM local search implemented in the
-.SM HMMER1
-program 
-.BR hmmls . 
-.\" --- h ---
-.TP
-.B \-h
-Display usage help text.
-.\" --- i ---
+the HMMER1 program 
+.B hmmfs. 
+The default mode is to emulate HMM local search implemented in the HMMER1 program 
+.B hmmls. 
 .TP
-.B \-i
+\-i
 Force all insert extension scores to be zero.
-.\" --- l ---
 .TP
-.B \-l
-Remove output line length limit. Individual lines of the output profile
-can exceed a length of 132 characters, removing the need to wrap them over several lines. 
-.\" --- o ---
+\-o
+Assume input to be in old HMMER1 format. Pftools version 2.2 assumes by default
+HMMER2 format. 
 .TP
-.B \-o
-Assume input to be in old
-.SM HMMER1
-ASCII format. Since version 2.2, the
-.B pftools
-assume by default the
-.SM HMMER2
-format. 
-.\" --- s ---
-.TP
-.B \-s
+\-s
 Implement semiglobal alignment mode. This option forces all external
 initiation scores to be identical to the internal initiation
 score at the beginning of the profile. Likewise, the external 
 termination scores are set to the value of the internal
 termination score at the end of the profile.
-.\" --- B ---
+.SH ADDITIONAL PARAMETERS 
 .TP
-.BI \-B\  norm_logbase
+B=#
 Logarithmic base to be used for normalization of profile
-match scores (only effective with old
-.SM HMMER1
-format).
-.br
-Default: 2.0
-.\" --- C ---
+match scores (only effective with old HMMER1 format).
+Default: B=2.0.
 .TP
-.BI \-C\  cut_off
+C=#
 Level zero cut-off value in normalized score units.
-.br
-Default: 8.5 (or 0.0 in conjunction with option 
-.BR \-o )
-.\" --- F ---
+Default: C=8.5 (C=0.0 in conjunction with option 
+-o).
 .TP
-.BI \-F\  multiplier
-Output score multiplier. On output, all profile scores are multiplied by
-this factor and rounded to the nearest integers.
-.br
-Only effective with
-.SM HMMER2
-format.
-.br
-Default: 100
-.\" --- H ---
+F=#
+Output score multiplier (only effective in conjunction with
+old HMMER1 format). On output, all profile scores are multiplied by
+this factor and rounded to the nearest integers. Default: F=100.
+With the new HMMER2 format, which uses an integer-rounded
+log-odds representation of the HMM parameters, the original values
+cannot be rescaled. 
 .TP
-.BI \-H\  init/term_score
+H=#
 High-cost initiation/termination score (only effective in conjunction with 
-.B \-s
-option). This score will be applied to
+-s option). This score will be applied to
 all external and internal initiation and termination scores
 at path matrix positions where
 initiation or termination at low cost is not possible according to semiglobal
 alignment mode.
-.br
-Default: * (low-value)
-.\" --- L ---
+Default: H=* (low-value).
 .TP
-.BI \-L\  score_logbase
+L=#
 Logarithmic base to be used for representation of profile
-scores (only effective in conjunction with old
-.SM HMMER1
-format).
-.br
-Default: 1.0233739 (1/30 bit units)
-.\" --- M ---
+scores (only effective in conjunction with old HMMER1 format).
+Default: 1.0233739 (1/30 bit units).
 .TP
-.BI \-M\  nb_unprotect
+M=#
 Maximal number of unprotected residues at the ends of the profile.
-.br
-Type: integer
-.br
-Default: 5 (meaning that the protected region starts at position 6).
-.\" --- P ---
+Default: M=5.
 .TP
-.BI \-P\  percent_unprotect
+P=#
 Percent profile-length at the ends of the profile,
-which will not be included in the protected area.
-.br
-Type: real
-.br
-Default: 0 (range 0 to 100)
-.\" --- Q ---
+which will not be included in the protected area
+(may be overwritten by parameter 
+.I M,
+see above). Default: P=0.
 .TP
-.BI \-Q\  odds_ratio
+Q=#
 Position-independent odds ratio assumed for unknown residues.
 This parameter determines 
 the default values for profile scores
 .I M0
 and 
-.IR I0 .
+.I I0.
 Note that the 
 .I I0
 scores may be over-written by the
-.B \-i   
+.I -i   
 option.
-.br
-Default: 0.8
-.\" ------------------------------------------------
-.\" Parameters section
-.\" ------------------------------------------------
-.SH PARAMETERS 
-.TP
-Note:
-for backwards compatibility, release 2.3 of the
-.B pftools
-package will parse the version 2.2 style parameters, but these are
-.I deprecated
-and the corresponding option (refer to the
-.I options
-section) should be used instead.
-.TP
-B=#
-Match score logarithmic base.
-.br
-Use option
-.B \-B
-instead.
-.TP
-C=#
-Level zero cut-off.
-.br
-Use option
-.B \-C
-instead.
-.TP
-F=#
-Output score multiplier.
-.br
-Use option
-.B \-F
-instead.
-.TP
-H=#
-High-cost init/term score.
-.br
-Use option
-.B \-H
-instead.
-.TP
-L=#
-Profile scores logarithmic base.
-.br
-Use option
-.B \-L
-instead.
-.TP
-M=#
-Maximal number of unprotected residues.
-.br
-Use option
-.B \-M
-instead.
-.TP
-P=#
-Percentage of unprotected residues.
-.br
-Use option
-.B \-P
-instead.
-.TP
-Q=#
-Unknown residues odds ratio.
-.br
-Use option
-.B \-Q
-instead.
-.\" ------------------------------------------------
-.\" Examples section
-.\" ------------------------------------------------
+Default: Q=0.8.
 .SH EXAMPLES
 .TP
 (1)
 .B htop 
 pfam_sh3.hmm > pfam_sh3.prf
-.IP
-Converts the
-.SM HHMER2
-formatted SH3 domain profile
-.RI ' pfam_sh3.hmm '
-into a generalized
-.SM PROSITE
-profile. 
+
+Converts the HHMER2-formatted SH3 domain profile
+in "pfam_sh3.hmm" into a generalized profile. 
 After this conversion, the following two commands:
-.IP
+
 .B hmmsearch 
 \--null2  pfam_sh3.hmm sh3.seq 
 .br
 .B pfsearch
-\-fy -C 5.0 pfam_sh3.prf sh3.seq
-.IP
+\-fy pfam_sh3.prf sh3.seq C=5.0
+
 should produce equivalent results in terms of raw scores
 and profile-sequence alignments (E-values and normalized scores
 will usually be different). Note that the program 
 .B hmmsearch
-is from Sean Eddy's
-.SM HMMER2
-package
-.RI ( http://hmmer.wustl.edu/ ).
-.\" ------------------------------------------------
-.\" Exit code section
-.\" ------------------------------------------------
-.SH EXIT CODE
-.LP
-On successful completion of its task,
-.B htop
-will return an exit code of 0. If an error occurs, a diagnostic message will be
-output on standard error and the exit code will be different from 0. When conflicting
-options where passed to the program but the task could nevertheless be completed, warnings
-will be issued on standard error.
-.\" ------------------------------------------------
-.\" See also section
-.\" ------------------------------------------------
-.SH "SEE ALSO"
-.BR pfsearch (1),
-.SM HMMER
-documentation
-.\" ------------------------------------------------
-.\" Author section
-.\" ------------------------------------------------
+is from Sean Eddy's HMMER2 package (http://hmmer.wustl.edu/).
 .SH AUTHOR
-The
-.B pftools
-package was developped by Philipp Bucher.
+Philipp Bucher
 .br
-Any comments or suggestions should be addressed to <pftools at isb-sib.ch>.
+Philipp.Bucher at isrec.unil.ch
diff --git a/man/pfmake.1 b/man/pfmake.1
index dffcf68..794f8ce 100644
--- a/man/pfmake.1
+++ b/man/pfmake.1
@@ -1,206 +1,74 @@
-.\"
-.\" $Id: pfmake.1,v 1.2 2003/08/11 12:09:14 vflegel Exp $
-.\" Copyright (c) 2003 Swiss Institute of Bioinformatics <pftools at isb-sib.ch>
-.\" Process this file with
-.\" groff -man -Tascii <name>
-.\" for ascii output or
-.\" groff -man -Tps <name>
-.\" for postscript output
-.\"
-.TH PFMAKE 1 "August 2003" "pftools 2.3" "pftools"
-.\" ------------------------------------------------
-.\" Name section
-.\" ------------------------------------------------
+.TH PFMAKE 1 "July 1999" "pftools 2.2"
 .SH NAME
 pfmake \- generate a profile from a multiple sequence alignment 
-.\" ------------------------------------------------
-.\" Synopsis section
-.\" ------------------------------------------------
 .SH SYNOPSIS
-.TP 10
-.B pfmake
-[
-.B \-0123abcehlms
-] [
-.B \-E
-.I gap_extend
-] [
-.B \-F
-.I score_multiplier
-] [
-.B \-G
-.I gap_open
-] [
-.B \-H
-.I high_init/term
-] [
-.B \-I
-.I gap_increment
-] [
-.B \-L
-.I low_init/term
-] [
-.B \-M
-.I gap_multiplier
-] [
-.B \-S
-.I matrix_multiplier
-] [
-.B \-T
-.I gap_region
-] [
-.B \-X
-.I gap_excision
-] [
-.I ms_file
-|
-.B \-
-]
-.I score_matrix
-[
-.I profile
-] [
-.I parameters
-]
-.\" ------------------------------------------------
-.\" Description section
-.\" ------------------------------------------------
+.LP
+.nf
+\fBpfmake\fP [ -0123abes ] [ msf-file | - ] score-matrix [ profile-file ]
+           [E=#] [F=#] [G=#] [H=#] [I=#] [L=#] [M=#] [S=#] [T=#] [X=#] 
+.fi
 .SH DESCRIPTION
 .B pfmake
-generates a
-.SM PROSITE
-profile from a multiple sequence alignment using methods
-described by Gribskov
-.IR "et al" .
-(1990), Luethy
-.IR "et al" .
-(1994), and Thompson
-.IR "et al" .
-(1994), with modifications to exploit the features of the new profile format.
-The file containing the multiple sequence alignment
-.RI ( ms_file )
-must be either in MSF format as generated by
-.SM GCG
-programs or by
-.B readseq
-(checksums are ignored) or in MSA format as created by
-.BR psa2msa (1).
-If
-.RB ' \- '
-is specified instead of a filename, the multiple sequence alignment is read
-from the standard input. The
-.I score_matrix
-file must also be in
-.SM GCG
-format. 
-.PP
-If an already existing
-.I profile
-is given as input via the third optional argument, the parameters of the
-DISJOINT, NORMALIZATION and CUT_OFF blocks will be read from input, all other
-profile parameters will be recalculated.
+generates a PROSITE profile from a multiple sequence alignment using methods
+described by Gribskov et al. (1990), Luethy et al. (1994),
+and Thompson et al. (1994), with modifications to exploit the features of the
+new profile format. The file containing the multiple sequence alignment (msf-file) must be
+in MSF format as generated by GCG programs or by readseq (checksums are ignored).
+The score-matrix file must also be in GCG format. 
+If `-' is specified instead
+of a real filename, the multiple sequence alignment is read
+from the standard input.
+
+If an already existing profile is given as input via the third optional
+argument, the parameters of the DISJOINT, NORMALIZATION, AND CUT_OFF
+blocks will be read from input, all other profile parameters
+will be recalculated.
 Header and footer lines outside the matrix block will also be transferred 
 from input to output.
-.PP
-If no input profile is given, the disjointness definition will be set to
-PROTECT with borders leaving short unprotected tails (maximum 5 positions)
-at the beginning and at the end of the profile. Furthermore, one normalization mode  
-.RI ( n_score \ =\  raw_score \ /\  F ,
-where
-.I F
-is the output score multiplier,
-.I see
-below), and two cut-off values (level 0: 8.5, level -1: 6.5) 
+
+If no input profile is given,
+the disjointness definition will be set to PROTECT with borders leaving 
+short unprotected tails (maximum 5 positions) at the beginning and
+at the end of the profile. Furthermore, one normalization mode  
+(\fIn-score = raw-score / F\fP , where \fIF\fP is the output score multiplier
+, \fIsee\fP below), and two cut-off values (level 0:8.5, level -1:6.5) 
 will be defined.   
-.\" ------------------------------------------------
-.\" Options section
-.\" ------------------------------------------------
 .SH OPTIONS 
-.\" --- ms_file ---
-.TP
-.I ms_file
-Input multiple sequence alignment.
-.br
-The content of the file must be either in MSF or in MSA format.
-If the filename is replaced by a
-.RB ' \- ',
-.B pfmake
-will read the input alignment from
-.BR stdin .
-.\" --- score_matrix ---
 .TP
-.I score_matrix
-Residue score matrix file.
-.br
-Contains the substitution scores for all pairs of residues
-of the sequence alphabet. The file must be in
-.SM GCG
-format.
-.\" --- profile ---
-.TP
-.I profile
-Optional profile file.
-.br
-If a filename is specified, the profile will be parsed and
-those parameters mentionned in the
-.I description
-section will be kept for the computation of the output profile.
-.\" --- 0 ---
-.TP
-.B \-0
-Global alignment mode.
-.br
-Initiation (termination) at low cost
+\-0
+Global alignment mode; initiation (termination) at low cost
 is possible only if the alignment starts at the beginning (end) of the 
 profile and at the beginning (end) of the sequence.
-.\" --- 1 ---
 .TP
-.B \-1
-Domain global alignment mode.
-.br
-Initiation (termination) at low cost
+\-1
+Domain global alignment mode; initiation (termination) at low cost
 is possible only at the beginning (end) of the profile; it may
 start and end at any position within the sequence. 
-.\" --- 2 ---
 .TP
-.B \-2
-Semi-global alignment mode.
-.br
-Initiation (termination) at low cost
+\-2
+Semi-global alignment mode; initiation (termination) at low cost
 is possible if the alignment starts either at the beginning (end) of the 
-profile or at the beginning (end) of the sequences.
-.br
-This is the default alignment mode.
-.\" --- 3 ---
+profile or at the beginning (end) of the sequences. This is the 
+default alignment mode.
 .TP
-.B \-3
-Local alignment mode.
-.br
-Initiation (termination) at low cost
+\-3
+Local alignment mode; initiation (termination) at low cost
 is possible anywhere. The high-cost initiation/termination score
 (parameter 
-.IR H )
+.I H)
 is meaningless. 
-.\" --- a ---
 .TP
-.B \-a
-Causes
-.B pfsearch
-to weight gaps asymmetrically, as in Gribskov
-.IR "et al" .
-(1990).
-.\" --- b ---
+\-a
+Causes pfsearch to weight gaps asymmetrically, as in Gribskov et al. (1990).
 .TP
-.B \-b
-Block profile mode.
-.br
-By imposing additional constraints on the placement of
+\-b
+Block profile mode. By imposing additional constraints on the placement of
 insertions and deletions, this mode produces profiles that favor alignments
 with insertions and deletions positioned symmetrically around a few 
 positions. For each gap region a gap center is defined which
 usually corresponds to the place where gap excision has been applied
 (see parameter 
-.IR X ).
+.I X).
 If no gap excision has been applied, the position is chosen such as to 
 maximize the sum of deletion opening events before, and  
 deletion closing events after the gap center.
@@ -208,288 +76,110 @@ Within a given gap region
 reduced deletion opening penalties are offered only before,
 reduced deletion closing penalties only after,
 and reduced insertion penalties only at the center.
-.br
 This option is incompatible with options 
-.B \-a
+.I -a
 and
-.B \-e
+.I -e
 and 
 automatically disables them.
-.\" --- c ---
 .TP
-.B \-c
-Circular profile.
-.br
-The topology of the profile is declared as 
+\-c
+Circular profile. The topology of the profile is declared as 
 circular. The first and the last insert positions are merged 
 by retaining the higher value of each parameter type. 
-.\" --- e ---
 .TP
-.B \-e
-Enables endgap-weighting mode as implemented in the
-.SM GCG
-program
-.BR ProfileMake .
+\-e
+Enables endgap-weighting mode as implemented in the GCG program
+.B ProfileMake.
 Endgaps in the multiple sequence alignment will be interpreted
 as deletions relative to the other sequences and thus be
 considered for the delineation of gap regions. 
-The default is no endgap weighting as introduced by Thompson
-.IR "et al" .
-(1994) in the program
-.BR ProfileWeight .
-.\" --- h ---
-.TP
-.B \-h
-Display usage help text.
-.\" --- l ---
-.TP
-.B \-l
-Remove output line length limit. Individual lines of the output profile
-can exceed a length of 132 characters, removing the need to wrap them over several lines. 
-.\" --- m ---
+The default is no endgap weighting as introduced by Thompson et al. (1994) 
+in the program
+.B ProfileWeight.
 .TP
-.B \-m
-Input multiple sequence alignment is in MSA format.
-.\" --- s ---
-.TP
-.B \-s
-Causes
-.B pfsearch
-to weight gaps symmetrically (default mode). The
+\-s
+Causes pfsearch to weight gaps symmetrically (default mode). The
 initial gap opening scores 
-.RI ( MD , \ MI )
+.I (MD, MI)
 computed from the 
 maximal gap length and the command-line parameters 
-.IR E , \ G , \ I ,
+.I E,G,I,
 and 
-.IR M ,
+.I M,
 will be divided by two and the resulting value will be assigned to both 
 gap opening and gap closing scores 
-.RI ( MI , \ IM , \ MD , \ DM ).
-.\" --- E ---
-.TP
-.BI \-E\  gap_extend
-Gap extension penalty.
-.I See
-Gribskov
-.IR "et al" .
-(1990).
-.br
-Default: 0.2 (appropriate for 1/3 bit-scaled blosum45 matrix)  
-.\" --- F ---
-.TP
-.BI \-F\  score_multiplier
-Output score multiplier.
-.br
-On output, all profile scores are multiplied by
-this factor and rounded to nearest integers.
-.br
-Default: 100
-.\" --- G ---
-.TP
-.BI \-G\  gap_open
-Gap opening penalty.
-.I See
-Gribskov
-.IR "et al" .
-(1990).
-.br
-Default: 2.1 (appropriate for 1/3 bit-scaled blosum45 matrix)  
-.\" --- H ---
-.TP
-.BI \-H\  high_init/term
-High-cost initiation/termination score.
-.br
-This score will be applied to
-all external and internal initiation and termination scores corresponding
-to path matrix positions where initiation or termination at low cost is not
-possible according to the alignment mode specified.
-.br
-Default: * (low-value)
-.\" --- I ---
-.TP
-.BI \-I\  gap_increment
-Gap penalty multiplier increment.
-.I See
-Gribskov
-.IR "et al" .
-(1990).
-.br 
-Default: 0.1
-.\" --- L ---
-.TP
-.BI \-L\  low_init/term
-Low-cost initiation/termination score.
-.br
-This score will be applied to all external and internal initiation and 
-termination scores corresponding to path matrix positions where  
-initiation or termination at low cost is possible according to the alignment
-mode specified.
-.br
-Default: 0
-.\" --- M ---
-.TP
-.BI \-M\  gap_multiplier
-Maximum gap penalty multiplier.
-.I See
-Gribskov
-.IR "et al" .
-(1990). 
-Default: 0.333
-.\" --- S ---
-.TP
-.BI \-S\  matrix_multiplier
-Score matrix multiplier.
-.br
-On input, the numbers of the score matrix are multipled by this factor.
-.br
-Default: 0.1  
-.\" --- T ---
-.TP
-.BI \-T\  gap_region
-Gap region threshold.
-.br
-This is the minimal fraction of gap characters a column of the multiple sequence
-alignment must contain in order to be considered part of a gap region.
-.br
-Default: 0.01
-.\" --- X ---
-.TP
-.BI \-X\  gap_excision
-Gap excision threshold.
-.br
-This is the minimal fraction of non-gap characters a column of the multiple sequence
-alignment must contain in order to be converted into a match position. The 
-.I IM
-and 
-.I MI 
-transition scores of insert positions corresponding to excised columns
-are set to zero; the other parameters remain unchanged.
-.br
-Default: 0.5
-.\" ------------------------------------------------
-.\" Parameters section
-.\" ------------------------------------------------
+.I (MI, IM, MD, DM).
 .SH PARAMETERS 
 .TP
-Note:
-for backwards compatibility, release 2.3 of the
-.B pftools
-package will parse the version 2.2 style parameters, but these are
-.I deprecated
-and the corresponding option (refer to the
-.I options
-section) should be used instead.
-.TP
 E=#
-Gap extension penalty.
-.br
-Use option
-.B \-E
-instead.
+Gap extension penalty, \fIsee\fR Gribskov et al. (1990). Default: E=0.2 
+(appropriate for 1/3 bit-scaled blosum45 matrix).  
 .TP
 F=#
-Output score multiplier.
-.br
-Use option
-.B \-F
-instead.
+Output score multiplier. On output, all profile scores are multiplied by
+this factor and rounded to nearest integers. Default: F=100.
 .TP
 G=#
-Gap opening penalty
-.br
-Use option
-.B \-G
-instead.
+Gap opening penalty, \fIsee\fR Gribskov et al. (1990). Default: G=2.1
+(appropriate for 1/3 bit-scaled blosum45 matrix).  
 .TP
 H=#
-High cost initiation/termination score.
-.br
-Use option
-.B \-H
-instead.
+High-cost initiation/termination score. This score will be applied to
+all external and internal initiation and termination scores corresponding
+to path matrix positions where  
+initiation or termination at low cost is not possible according to the alignment
+mode specified. Default: H=* (low-value).
 .TP
 I=#
-Gap penalty multiplier increment.
-.br
-Use option
-.B \-I
-instead.
+Gap penalty multiplier increment, \fIsee\fR Gribskov et al. (1990). 
+Default: I=0.1.
 .TP
 L=#
-Low cost initiation/termination score.
-.br
-Use option
-.B \-L
-instead.
+Low-cost initiation/termination score. This score will be applied to
+all external and internal initiation and termination scores corresponding
+to path matrix positions where  
+initiation or termination at low cost is possible according to the alignment
+mode specified. Default: L=0.
 .TP
 M=#
-maximum gap penalty multiplier.
-.br
-Use option
-.B \-M
-instead.
+Maximum gap penalty multiplier, \fIsee\fR Gribskov et al. (1990). 
+Default: M=0.333.
 .TP
 S=#
-Score matrix multiplier.
-.br
-Use option
-.B \-S
-instead.
+Score matrix multiplier. On input, the numbers of the score matrix 
+are multipled by this factor. Default: S=0.1.  
 .TP
 T=#
-Gap region threshold.
-.br
-Use option
-.B \-T
-instead.
+Gap region threshold. This is the minimal fraction of gap characters
+a column of the multiple sequence alignment must contain 
+in order to be considered part of a gap region. Default: T=0.01.
 .TP
 X=#
-Gap excision threshold.
-.br
-Use option
-.B \-X
-instead.
-.\" ------------------------------------------------
-.\" Examples section
-.\" ------------------------------------------------
+Gap excision threshold. This is the minimal fraction of non-gap characters
+a column of the multiple sequence alignment must contain
+in order to be converted into a match position. The 
+.I IM
+and 
+.I MI 
+transition scores of insert positions corresponding to excised columns
+are set to zero; the other parameters remain unchanged.
+Default: X=0.5.
 .SH EXAMPLES
 .TP
 (1)
 .B pfmake
-\-b1 \-H 0.6 sh3.msf blosum45.cmp > sh3_block.prf    
-.IP
+-b1 sh3.msf blosum45.cmp H=0.6 > sh3_block.prf    
+
 Generates a domain-global block profile from a multiple alignment
 of SH3 domains using the blosum45 matrix. 
-The file
-.RI ' sh3.msf '
-contains a multiple alignment of 20 SH3 domains from
-.SM SWISS-PROT
+sh3.msf contains a multiple alignment of 20 SH3 domains from SWISS-PROT
 release 32 including sequence weights. 
-The file
-.RI ' blosum45.cmp '
-contains a 1/3 bits-scaled blosum45 matrix in
-.SM GCG
-format.
-.br
+blosum45.cmp contains a 1/3 bits-scaled blosum45 matrix in
+GCG format.
 Note that fragment matches (alignments to parts of the profile) are not 
-prohibited but penalized by the option 
-.B \-H
-.IR 0.6 . 
-.\" ------------------------------------------------
-.\" Exit code section
-.\" ------------------------------------------------
-.SH EXIT CODE
-.LP
-On successful completion of its task,
-.B pfmake
-will return an exit code of 0. If an error occurs, a diagnostic message will be
-output on standard error and the exit code will be different from 0. When conflicting
-options where passed to the program but the task could nevertheless be completed, warnings
-will be issued on standard error.
-.\" ------------------------------------------------
-.\" References section
-.\" ------------------------------------------------
+prohibited but penalized by the parameter 
+.I H=0.6. 
 .SH REFERENCES
 .LP
 Bucher P, Karplus K, Moeri N & Hofmann, K. (1996).
@@ -497,18 +187,18 @@ Bucher P, Karplus K, Moeri N & Hofmann, K. (1996).
 .I technique based on generalized
 .I profiles.
 Comput. Chem. 
-.BR 20 :3-24.
+\fB20\fR:3-24.
 .LP
 Gribskov M, Luethy R & Eisenberg D (1990).
 .I Profile analysis. 
 Meth. Enzymol.
-.BR 183 :146-159.
+\fB183\fR:146-159.
 .LP
 Luethy R, Xenarios I & Bucher P (1994).
 .I Improving the sensitivity of the
 .I sequence profile method.
 Prot. Sci. 
-.BR 3 :139-146.
+\fB3\fR:139-146.
 .LP
 Thompson JD, Higgins DG & Gibson TJ (1994)
 .I Improved sensitivity of profile
@@ -516,22 +206,8 @@ Thompson JD, Higgins DG & Gibson TJ (1994)
 .I use of sequence weights
 .I and gap excision.  
 Comput. Appl. Biosci.  
-.BR 10 :19-29.
-.\" ------------------------------------------------
-.\" See also section
-.\" ------------------------------------------------
-.SH "SEE ALSO"
-.BR pfsearch (1),
-.BR pfscan (1),
-.BR psa2msa (1),
-.BR psa (5),
-.BR xpsa (5)
-.\" ------------------------------------------------
-.\" Author section
-.\" ------------------------------------------------
+\fB10\fR:19-29.
 .SH AUTHOR
-The
-.B pftools
-package was developped by Philipp Bucher.
+Philipp Bucher
 .br
-Any comments or suggestions should be addressed to <pftools at isb-sib.ch>.
+Philipp.Bucher at isrec.unil.ch
diff --git a/man/pfscale.1 b/man/pfscale.1
index 07b5bd7..2b40d84 100644
--- a/man/pfscale.1
+++ b/man/pfscale.1
@@ -1,128 +1,34 @@
-.\"
-.\" $Id: pfscale.1,v 1.2 2003/08/11 12:09:14 vflegel Exp $
-.\" Copyright (c) 2003 Swiss Institute of Bioinformatics <pftools at isb-sib.ch>
-.\" Process this file with
-.\" groff -man -Tascii <name>
-.\" for ascii output or
-.\" groff -man -Tps <name>
-.\" for postscript output
-.\"
-.TH PFSCALE 1 "August 2003" "pftools 2.3" "pftools"
-.\" ------------------------------------------------
-.\" Name section
-.\" ------------------------------------------------
+.TH PFSCALE 1 "July 1999" "pftools 2.2"
 .SH NAME
 pfscale \- fit parameters of an extreme-value distribution to a profile score list 
-.\" ------------------------------------------------
-.\" Synopsis section
-.\" ------------------------------------------------
 .SH SYNOPSIS
-.TP 10
 .B pfscale
-[
-.B \-hl
-] [
-.B \-L
-.I log_base
-] [
-.B \-M
-.I mode_nb
-] [
-.B \-N
-.I db_size
-] [
-.B \-P
-.I upper_limit
-] [
-.B \-Q
-.I lower_limit
-] [
-.I score_list
-|
-.B \-
-] [
-.I profile
-] [
-.I parameters
-]
-.\" ------------------------------------------------
-.\" Description section
-.\" ------------------------------------------------
+[ score-list | - ] [ profile-file ] [L=#] [N=#] [P=#] [Q=#] 
 .SH DESCRIPTION
 .B pfscale 
-fits the two parameters of an extreme-value distribution to a
-sorted score distribution obtained
+fits the two parameters of an extreme-value distribution to a score
+distribution obtained
 by searching a sequence database with a profile. 
-The file
-.RI ' score_list '
-is a sorted list of profile match scores generated by
-.BR pfsearch .
-If
-.RB ' \- '
-is specified instead of a filename, the score list is read from the
-standard input. The result is written to the standard output.
+score-list is a sorted list of profile match scores generated by
+.B pfsearch.
+The result is written to the standard output.
 .PP
 If the original profile is given as the second argument, 
-the normalization function with the lowest mode number or the lowest priority number
-specified within the profile will be 
+the normalization function specified within the profile will be 
 updated such as to produce -Log10 per-residue E-values. 
 If the second argument is omitted, the output 
 consists of a header line containing the normalization parameters
 followed by a modified score list, 
-showing
-.IR "score rank" ,
-.IR "original raw scores" ,
-.I log-cumulative frequencies
-and
-corresponding
-.I normalized scores
-next to each other.
+showing original scores, normalized scores, and
+corresponding log-cumulative frequencies next to each other.
 .PP
 Note that this program implements the significance estimation procedure for profile
-match scores described in Hofmann & Bucher (1995). 
+match scores described in (Hofmann & Bucher 1995). 
 It has been used for the calculation of the normalization parameters of 
-all profiles in the
-.SM PROSITE
-database. 
-.\" ------------------------------------------------
-.\" Options section
-.\" ------------------------------------------------
-.SH OPTIONS 
-.\" --- ms_file ---
-.TP
-.I score_list
-Input score list.
-.br
-The file must contain a sorted list of scores. The first field
-of each line is considered as being a score, all other fields on the same line are ignored.
-The different fields of each line should be delimited by whitespaces.
-If the filename is replaced by a
-.RB ' \- ',
-.B pfscale
-will read the score list from
-.BR stdin .
-.\" --- profile ---
-.TP
-.I profile
-Optional profile file.
-.br
-If a filename is specified, the profile will be parsed and
-either the lowest priority mode or the mode number specified with option
-.B \-M
-will be scaled. All cut-off levels which use the specified mode number will also
-be updated.
-.\" --- h ---
-.TP
-.B \-h
-Display usage help text.
-.\" --- l ---
-.TP
-.B \-l
-Remove output line length limit. Individual lines of the output profile
-can exceed a length of 132 characters, removing the need to wrap them over several lines. 
-.\" --- L ---
+all profiles in PROSITE. 
+.SH PARAMETERS
 .TP
-.BI \-L\  log_base
+L=#
 Logarithmic base of the parameters of the estimated extreme-value 
 distribution. 
 The parameters reported by 
@@ -130,195 +36,63 @@ The parameters reported by
 are expressed as logarithms
 and thus can be inserted directly into a linear normalization function
 defined in a generalized profile.
-.br
-Default: 10
-.\" --- M ---
-.TP
-.BI \-M\  mode_nb
-Mode number to scale.
-.br
-Defines which mode number (and implicitly which cut-off level) of the
-input
-.SM PROSITE
-profile should be scaled. This overrides the default behaviour of scaling
-only the normalization mode with the lowest priority (or lowest mode number).
-All cut-off levels defined in the profile as using this mode number (via the
-.I MODE
-keyword) will be updated as well.
-.\" --- N ---
+Default: L=10.
 .TP
-.BI \-N\  db_size
+N=#
 Size of the database from which the input score list was derived.
 The searched database is typically a shuffled version
 of a real protein or nucleotide sequence database.
-.br
-Default: 14147368 (size of
-.SM SWISS-PROT
-release 30 and shuffled derivatives of it).
-.\" --- P ---
+Default: N=14147368 (size of SWISS-PROT release 30 and shuffled
+derivatives of it).
 .TP
-.BI \-P\  upper_limit
+P=#
 Upper threshold of the probability range to which the extreme-value
 distribution will be fitted. 
-For instance: if
-.IR N =10'000'000
-and 
-.IR P =0.0001
+For instance: if N=10'000'000 and P=0.0001 (default value for P)
 then profile match scores below rank 1000
 in the sorted input list
 (corresponding to occurrence probabilities > 0.0001)
 will be ignored.
-.br
-Default: 0.0001
-.\" --- Q ---
 .TP
-.BI \-Q\  lower_limit
+Q=#
 Lower threshold of the probability range to which the extreme-value
 distribution will be fitted. 
-For instance: if
-.IR N =10'000'000
-and
-.IR Q =0.000001
+For instance: if N=10'000'000 and Q=0.000001 (default value for Q)
 then profile match scores above rank 10 in the sorted input list
 (corresponding to occurrence probabilities < 0.000001)
 will be ignored.
-.br
-Default: 0.000001
-.\" ------------------------------------------------
-.\" Parameters section
-.\" ------------------------------------------------
-.SH PARAMETERS
-.TP
-Note:
-for backwards compatibility, release 2.3 of the
-.B pftools
-package will parse the version 2.2 style parameters, but these are
-.I deprecated
-and the corresponding option (refer to the
-.I options
-section) should be used instead.
-.TP
-L=#
-Logarithmic base.
-.br
-Use option
-.B \-L
-instead.
-.TP
-M=#
-Mode number.
-.br
-Use option
-.B \-M
-instead.
-.TP
-N=#
-Database size.
-.br
-Use option
-.B \-N
-instead.
-.TP
-P=#
-Upper probability threshold.
-.br
-Use option
-.B \-P
-instead.
-.TP
-Q=#
-Lower probability threshold.
-.br
-Use option
-.B \-Q
-instead.
-.\" ------------------------------------------------
-.\" Examples section
-.\" ------------------------------------------------
 .SH EXAMPLES
 .TP
 (1)
 .B pfsearch
-\-fr \-C 200 sh3.prf shuffle20.seq |
-.B sort
-\-nr | 
-.B pfscale
-\-P 0.0001 \-Q 0.000001 \-
-.IP
+\-fr sh3.prf shuffle20.seq C=200 | sort -nr | 
+.B pfscale 
+\- P=0.0001 Q=0.000001
+ 
 derives score-normalization parameters for the SH3 domain profile 
-in file
-.RB ' sh3.prf '. 
-The file
-.RB ' shuffle20.seq '
-contains a window-shuffled derivative of 
-.SM SWISS-PROT
-release 30 in Pearson/Fasta format (window-size 20). 
+in sh3.prf. 
+shuffle20.seq contains a window-shuffled derivative of 
+SWISS-PROT release 30 in Pearson/Fasta format (window-size 20). 
 Note that the implicit default of 
 .I N
 corresponds to the size of this database and thus 
 needs not to be specified on the command line.
-The cut-off value 200 for the
-.BR pfsearch (1)
-option
-.B \-C
-will produce about 2000 matches completely covering the range defined by
-the command line parameters
-.B \-P
-and 
-.B \-Q
+The cut-off value C=200 will produce about 2000 matches
+completely covering the range defined by the command line parameters
 of
-.BR pfscale .
+.I P
+and 
+.I Q.
 A suitable cut-off value has to be guessed in advance 
-by computing a few optimal alignment scores for random sequences. 
-.\" ------------------------------------------------
-.\" Exit code section
-.\" ------------------------------------------------
-.SH EXIT CODE
-.LP
-On successful completion of its task,
-.B pfscale
-will return an exit code of 0. If an error occurs, a diagnostic message will be
-output on standard error and the exit code will be different from 0. When conflicting
-options where passed to the program but the task could nevertheless be completed, warnings
-will be issued on standard error.
-.\" ------------------------------------------------
-.\" Notes section
-.\" ------------------------------------------------
-.SH NOTES
-.TP
-(1)
-The current version of
-.B pfscale
-does not yet support the
-.BR xpsa (5)
-output format produced by
-.BR pfscan "(1) or " pfsearch (1).
-The score list should therefore be generated without the
-.BR pfscan "(1) and " pfsearch (1)
-option
-.BR \-k .
-.\" ------------------------------------------------
-.\" References section
-.\" ------------------------------------------------
+by computing a few optimal alignment scores
+for random sequences. 
 .SH REFERENCES
 .LP
-Hofmann K & Bucher P. (1995).
-.I The FHA-domain: a nuclear signalling domain found in protein kinases and transcription factors. 
+Hofmann K & Bucher P (1995).
+\fIThe FHA-domain: a nuclear signalling domain found in protein kinases and transcription factors.\fP 
 Trends Biochem. Sci.
-.BR 20 :47-349. 
-.\" ------------------------------------------------
-.\" See also section
-.\" ------------------------------------------------
-.SH "SEE ALSO"
-.BR pfsearch (1),
-.BR pfscan (1),
-.BR xpsa (5)
-.\" ------------------------------------------------
-.\" Author section
-.\" ------------------------------------------------
+\fB20\fR:47-349. 
 .SH AUTHOR
-The
-.B pftools
-package was developped by Philipp Bucher.
+Philipp Bucher
 .br
-Any comments or suggestions should be addressed to <pftools at isb-sib.ch>.
+Philipp.Bucher at isrec.unil.ch
diff --git a/man/pfscan.1 b/man/pfscan.1
index 427773d..075c8fa 100644
--- a/man/pfscan.1
+++ b/man/pfscan.1
@@ -1,49 +1,11 @@
-.\"
-.\" $Id: pfscan.1,v 1.5 2003/08/11 12:09:14 vflegel Exp $
-.\" Copyright (c) 2003 Swiss Institute of Bioinformatics <pftools at isb-sib.ch>
-.\" Process this file with
-.\" groff -man -Tascii <name>
-.\" for ascii output or
-.\" groff -man -Tps <name>
-.\" for postscript output
-.\"
-.TH PFSCAN  1 "July 2003" "pftools 2.3" "pftools"
-.\" ------------------------------------------------
-.\" Name section
-.\" ------------------------------------------------
+.TH PFSCAN  1 "June 1999" "pftools 2.2"
 .SH NAME
 pfscan \- scan a protein or DNA sequence with a profile library 
-.\" ------------------------------------------------
-.\" Synopsis section
-.\" ------------------------------------------------
+
 .SH SYNOPSIS
-.TP 10
 .B pfscan
-[
-.B \-abdfhlLmruksvxyz
-] [
-.B \-C
-.I cut_off
-] [
-.B \-M
-.I mode_nb
-] [
-.B \-W
-.I width
-] [
-.I sequence
-|
-.B \-
-] [
-.I profile_library
-|
-.B \-
-] [
-.I parameters
-]
-.\" ------------------------------------------------
-.\" Description section
-.\" ------------------------------------------------
+[ -abflLrsuxy ] [ seq-file | - ]
+            [ profile-library-file | - ]    [L=#] [W=#]
 .SH DESCRIPTION
 .B pfscan 
 compares a protein or nucleic acid sequence against a profile library. 
@@ -51,366 +13,115 @@ The result is an unsorted list of profile-sequence matches written to
 the standard output.
 A variety of output formats containing different informations can be specified
 via the options
-.BR \-l , \ \-L , \ \-r , \ \-k , \ \-s , \ \-x , \ \-y
+.I -a, -l, -L, -r, -u, -s, -x, -y
 and 
-.BR \-z .
-The file
-.RI ' sequence '
-contains a sequence in
-.SM EMBL/SWISS-PROT
+.I -z.
+.I seq-file
+contains a sequence in EMBL/SWISS-PROT
 format (assumed by default) or in Pearson/Fasta
 format (indicated by option 
-.BR \-f ).
-The
-.RI ' profile_library '
-file contains a library of profiles in
-.SM PROSITE
-format. 
-If
-.RB ' \- '
-is specified instead of one of the filenames, the corresponding data is read
-from the standard input.
-.\" ------------------------------------------------
-.\" Options section
-.\" ------------------------------------------------
-.SH OPTIONS 
-.\" --- sequence ---
-.TP
-.I sequence
-Input query sequence.
-.br
-This DNA or protein sequence will be used to search for matches to
-a library of
-.SM PROSITE
-profiles.
-.br
-The content of the file must be either in
-.SM EMBL/SWISS-PROT
-(default) or in Pearson/Fasta format (option
-.BR \-f ).
-If the filename is replaced by a
-.RB ' \- ',
+.I -f).
+.I profile-library-file 
+contains a library of profiles in PROSITE format. 
 .B pfscan
-will read the input sequence from
-.BR stdin .
-.\" --- profile_library ---
-.TP
-.I profile_library
-Library of
-.SM PROSITE
-profiles.
-.br
-This file should contain one or several
-.SM PROSITE
-profiles, against which the query sequence will be matched.
-Each entry in this library should be separated from the next by
-a line containing only the
-.RB ' // '
-code.
-If the filename is replaced by a
-.RB ' \- ',
-.B pfscan
-will read the profile library from
-.BR stdin .
-.\" --- a ---
+can be used as a filter if - is used instead of one of the input
+filenames.
+.SH OPTIONS 
 .TP
-.B \-a
+\-a
 Report optimal alignment scores for 
 all profiles regardless of the cut-off value. 
-This option simultaneously forces 
-.IR DISJOINT = UNIQUE .   
-.\" --- b ---
+This option simultaneously forces DISJOINT=UNIQUE.   
 .TP
-.B \-b
+\-b
 Search the complementary strand of the DNA sequence as well.
-.\" --- f ---
 .TP
-.B \-f
+\-f
 Input sequence is in Pearson/Fasta format.
-.\" --- h ---
 .TP
-.B \-h
-Display usage help text.
-.\" --- l ---
-.TP
-.B \-l
-Indicate the value of the highest cut-off level exceeded by the match score
+\-l
+Indicate highest cut-off level exceeded by the match score
 in the output list. 
-.\" --- L ---
 .TP
-.B \-L
+\-L
 Indicate by character string the highest cut-off level exceeded by the match score
-in the output list.
-.br
-.RS
+in the output list. Note that the generalized profile format includes a text
+string field to specify a name for a cut-off level. The \-L option causes the
+program to display the first two characters of this text string
+(usually something like "!" "?", "??", etc.) at the beginning of each match description.
 .TP
-Note:
-The generalized profile format includes a text
-string field to specify a name for a cut-off level. The
-.B \-L
-option causes the program to display the first two characters of this text string
-(usually something like
-.RI ' ! ',\ ' ? ',\ ' ?? ',
-etc.) at the beginning of each match description.
-.RE
-.\" --- m ---
-.TP
-.B \-m
-Report individual matches for circular profiles.
-.br
-If the profile is circular, each match between a sequence and a profile can be composed
-of a stretch of individual matches of the profile. By default,
-.B pfscan
-reports only the total matched region. When this option is set, detailed information for 
-each individual match will be output as well.
-.RS
-.TP
-Note:
-The scoring system for most circular profiles has been optimized to find
-total matches, therefore the normalized scores of individual matches of a circular profile
-to a sequence should be considered with caution.
-.RE
-.\" --- r ---
-.TP
-.B \-r
+\-r
 Use raw scores rather than normalized 
-scores for match selection.  The normalized score is not printed.
-.\" --- u ---
-.TP
-.B \-u
-Forces
-.IR DISJOINT = UNIQUE . 
-.\" --- C ---
-.TP
-.BI \-C\  cut_off
-Cut-off level to be used for match selection.
-.br
-The value of
-.RI ' cut_off '
-should be the numerical identifier of a cut-off level defined in the profile.
-The raw or normalized score of this level will then be used to include profile to
-sequence matches in the output list.
-.br
-If the specified level does not exist in the profile, the next higher (if 
-.I cut_off
-is negative) or next lower (if
-.I cut_off
-is positive) level defined is used instead.
-.br
-Type: integer
-.br
-Default: 0
-.\" --- M ---
-.TP
-.BI \-M\  mode_nb
-Normalization mode to use for score computation.
-.br
-The
-.RI ' mode_nb '
-specifies which normalization mode defined in the profile should be used
-to compute the normalized scores for profile to sequence matches. This
-option will override the profile's
-.I PRIORITY
-parameter.
-.br
-If the specified normalization mode does not exist in the profile, an error
-message will be output to standard error and the search is interrupted.
-.br
-Type: integer
-.br
-Default: lowest priority mode defined in the profile
-.\" ------------------------------------------------
-.\" Output modifiers subsection
-.\" ------------------------------------------------
-.SS Ouput modifiers
-.\" --- d ---
-.TP
-.B \-d
-Limit profile description length.
-.br
-If this option is set, the description of the profile on the header line
-will be limited in length. If the match information is longer than
-the output width specified using option
-.BR \-W ,
-the profile description will not be printed. Else the description will be truncated
-to fit the
-.B \-W
-value.
-.br
-By default, the profile description is not truncated. This option can not be used
-when option
-.B \-k
-is set.
-.\" --- k ---
-.TP
-.B \-k
-Use
-.BR xpsa (5)
-headers for output.
-.br
-When this option is set, all output types 
-.RI ( see
-below) will use
-an
-.BR xpsa (5)
-style header line. This format uses
-.IR keyword = value
-pairs to output alignment parameters. It is useful to transfer information between
-different sequence alignment tools.
-.\" --- s ---
+scores for match selection. Normalized scores 
+will not be listed in the output. 
 .TP
-.B \-s
+\-s
 List the sequences of the matched regions as well. 
 The output will be a Pearson/Fasta-formatted sequence
 library.
-.\" --- v ---
 .TP
-.B \-v
-Suppress sequence/profile parsing warnings.
-If this option is set no warning messages will be printed on
-.IR stderr .
-Only fatal errors will be reported. This option should be used
-with caution.
-.\" --- x ---
+\-u
+Forces DISJOINT=UNIQUE. 
 .TP
-.B \-x
+\-x
 List profile-sequence alignments 
-in
-.BR psa (5)
-format. Please refer to the corresponding man page for more information. 
-.\" --- y ---
+in pftools PSA format.  
 .TP
-.B \-y
+\-y
 Display alignments between the profile and the matched sequence regions in 
-a human-friendly pairwise alignment format.   
-.\" --- z ---
+a human-friendly format.   
 .TP
-.B \-z
+\-z
 Indicate starting and ending position of the matched profile range. The latter
 position will be given as a negative offset from the end of the profile. Thus
 the range [    1,    -1] means entire profile.
-.\" --- W ---
-.TP
-.BI \-W\  width
-Set alignment output width.
-.br
-The value of
-.RI ' width '
-specifies how many residues will be output on one line when any of the
-.BR \-s ,\  \-x \ or\  \-y
-options is set.
-.br
-Type: integer
-.br
-Default: 60
-.\" ------------------------------------------------
-.\" Parameters section
-.\" ------------------------------------------------
 .SH PARAMETERS
 .TP
-Note:
-for backwards compatibility, release 2.3 of the
-.B pftools
-package will parse the version 2.2 style parameters, but these are
-.I deprecated
-and the corresponding option (refer to the
-.I options
-section) should be used instead.
-.TP
 L=#
-Cut-off level.
-.br
-Use option
-.B \-C
-instead, not
-.BR \-L .
+Cut-off level to be used for match selection.
+If level 
+.I L
+is not specified in the profile, the next higher (if 
+.I L
+is negative) or next lower (if
+.I L
+is positive) level specified
+is used instead.
 .TP
 W=#
 Output width.
-.br
-Use option
-.B \-W
-instead.
-.\" ------------------------------------------------
-.\" Examples section
-.\" ------------------------------------------------
+Output lines will be truncated after
+.I W
+characters.
+Default: W=132.
 .SH EXAMPLES
 .TP
 (1)
 .B pfscan
-\-s GTPA_HUMAN prosite13.prf
-.IP
-Scans the human GAP protein for matches to profiles in
-.SM PROSITE 
+-s GTPA_HUMAN prosite13.prf
+
+Scans the human GAP protein for matches to profiles in PROSITE 
 release 13. 
-The file
-.RI ' GTPA_HUMAN ' 
-contains the 
-.SM SWISS-PROT
-entry P20936|GTPA_HUMAN.
-The profile library file
-.RI ' prosite13.prf ' 
-contains all profile entries of
-.SM PROSITE
-release 13.  
+GTPA_HUMAN contains the SWISS-PROT entry P20936|GTPA_HUMAN.
+prosite13.prf contains all profile entries of PROSITE release 13.  
 The output is a Pearson/Fasta-formatted sequence library containing 
 all sequence regions of the input sequence matching a profile in the 
 profile library. 
 .TP
 (2)
 .B pfscan
-\-by \-C 2 CVPBR322 ecp.prf
-.IP
+-by CVPBR322 ecp.prf L=2
+
 Scans both strands of plasmid PBR322 for high-scoring (level 2) 
 .I E. coli
 promoter matches.   
-The sequence file
-.RI ' CVPBR322 '
-contains
-.SM EMBL
-entry J01749|CVPBR322.
-The profile library file
-.RI ' ecp.prf '
-contains a profile for
+CVPBR322 contains EMBL entry J01749|CVPBR322.
+ecp.prf contains a profile for
 .I E. coli  
 promoters.
 The output includes profile-sequence alignments in a human-friendly
 format. 
-.\" ------------------------------------------------
-.\" Exit code section
-.\" ------------------------------------------------
-.SH EXIT CODE
-.LP
-On successful completion of its task,
-.B pfscan
-will return an exit code of 0. If an error occurs, a diagnostic message will be
-output on standard error and the exit code will be different from 0. When conflicting
-options where passed to the program but the task could nevertheless be completed, warnings
-will be issued on standard error.
-.\" ------------------------------------------------
-.\" Bugs section
-.\" ------------------------------------------------
-.SH "BUGS"
-If the match selection is based on normalized scores 
-.RI ( i.e.
-option
-.B \-r
-is not set), rounding errors can lead to the exclusion of some matches even if
-the raw score is above or equal to the specified cut-off level score.
-.\" ------------------------------------------------
-.\" See also section
-.\" ------------------------------------------------
-.SH "SEE ALSO"
-.BR pfsearch (1),
-.BR pfmake (1),
-.BR psa (5),
-.BR xpsa (5)
-.\" ------------------------------------------------
-.\" Author section
-.\" ------------------------------------------------
 .SH AUTHOR
-The
-.B pftools
-package was developped by Philipp Bucher.
+Philipp Bucher
 .br
-Any comments or suggestions should be addressed to <pftools at isb-sib.ch>.
+Philipp.Bucher at isrec.unil.ch
diff --git a/man/pfsearch.1 b/man/pfsearch.1
deleted file mode 100644
index 014b0f1..0000000
--- a/man/pfsearch.1
+++ /dev/null
@@ -1,415 +0,0 @@
-.\"
-.\" $Id: pfsearch.1,v 1.4 2003/07/24 08:40:52 vflegel Exp $
-.\" Copyright (c) 2003 Swiss Institute of Bioinformatics <pftools at isb-sib.ch>
-.\" Process this file with
-.\" groff -man -Tascii <name>
-.\" for ascii output or
-.\" groff -man -Tps <name>
-.\" for postscript output
-.\"
-.TH PFSEARCH 1 "July 2003" "pftools 2.3" "pftools"
-.\" ------------------------------------------------
-.\" Name section
-.\" ------------------------------------------------
-.SH NAME
-pfsearch \- search a protein or DNA sequence library for sequence segments 
-matching a profile
-.\" ------------------------------------------------
-.\" Synopsis section
-.\" ------------------------------------------------
-.SH SYNOPSIS
-.TP 10
-.B pfsearch
-[
-.B \-abdfhlLmruksvxyz
-] [
-.B \-C
-.I cut_off
-] [
-.B \-M
-.I mode_nb
-] [
-.B \-W
-.I width
-] [
-.I profile
-|
-.B \-
-] [
-.I sequence_library
-|
-.B \-
-] [
-.I parameters
-]
-.\" ------------------------------------------------
-.\" Description section
-.\" ------------------------------------------------
-.SH DESCRIPTION
-.B pfsearch 
-compares a query profile against a DNA or protein sequence library.
-The result is an unsorted list of profile-sequence matches written to the standard output. 
-A variety of output formats containing different informations can be specified 
-via the options 
-.BR \-l , \ \-L , \ \-r , \ \-k , \ \-s , \ \-x , \ \-y
-and 
-.BR \-z .
-The file
-.RI ' profile '
-contains a profile in
-.SM PROSITE
-format. The
-.RI ' sequence_library '
-file contains a sequence library in
-.SM EMBL/SWISS-PROT
-format (assumed by default) or in Pearson/Fasta
-format (indicated by option 
-.BR \-f ). 
-If
-.RB ' \- '
-is specified instead of one of the filenames, the corresponding data is read
-from the standard input.
-.\" ------------------------------------------------
-.\" Options section
-.\" ------------------------------------------------
-.SH OPTIONS 
-.\" --- profile ---
-.TP
-.I profile
-Input query profile.
-.br
-The
-.SM PROSITE
-profile contained in this file will be used to search for profile to sequence
-matches in a biological sequence library. If the filename is replaced by a
-.RB ' \- ',
-.B pfsearch
-will read the profile from
-.BR stdin .
-.\" --- sequence_library ---
-.TP
-.I sequence_library
-Library of DNA or protein sequences.
-.br
-This file should contain one or several
-.SM EMBL/SWISS-PROT
-(default) or Pearson/Fasta (option
-.BR \-f )
-formated DNA or protein sequences. The program
-.B pfsearch
-tries to identify matches between the input profile and all individual
-sequences of this library. If the filename is replaced by a
-.RB ' \- ',
-.B pfsearch
-will read the sequence library from
-.BR stdin .
-.\" --- a ---
-.TP
-.B \-a
-Report optimal alignment scores for 
-all sequences regardless of the cut-off value. 
-This option simultaneously forces 
-.IR DISJOINT = UNIQUE .   
-.\" --- b ---
-.TP
-.B \-b
-Search the complementary strands of DNA sequences as well.
-.\" --- f ---
-.TP
-.B \-f
-Input sequence library is in Pearson/Fasta format.
-.\" --- h ---
-.TP
-.B \-h
-Display usage help text.
-.\" --- l ---
-.TP
-.B \-l
-Indicate the value of the highest cut-off level exceeded by the match score
-in the output list. 
-.\" --- L ---
-.TP
-.B \-L
-Indicate by character string the highest cut-off level exceeded by the match score
-in the output list.
-.br
-.RS
-.TP
-Note:
-The generalized profile format includes a text
-string field to specify a name for a cut-off level. The
-.B \-L
-option causes the program to display the first two characters of this text string
-(usually something like
-.RI ' ! ',\ ' ? ',\ ' ?? ',
-etc.) at the beginning of each match description.
-.RE
-.\" --- m ---
-.TP
-.B \-m
-Report individual matches for circular profiles.
-.br
-If the profile is circular, each match between a sequence and a profile can be composed
-of a stretch of individual matches of the profile. By default,
-.B pfsearch
-reports only the total matched region. When this option is set, detailed information for 
-each individual match will be output as well.
-.RS
-.TP
-Note:
-The scoring system for most circular profiles has been optimized to find
-total matches, therefore the normalized scores of individual matches of a circular profile
-to a sequence should be considered with caution.
-.RE
-.\" --- r ---
-.TP
-.B \-r
-Use raw scores rather than normalized 
-scores for match selection. The normalized score is not printed, this option is useful
-to create raw score lists to be used with
-.BR pfscale (1).
-.\" --- u ---
-.TP
-.B \-u
-Forces
-.IR DISJOINT = UNIQUE . 
-.\" --- C ---
-.TP
-.BI \-C\  cut_off
-Cut-off value to be used for match selection.
-.br
-The value of
-.RI ' cut_off '
-overwrites the level zero cut-off value specified in the profile.
-.br
-An integer argument is interpreted as a raw score value,
-a decimal argument as a normalized score value.
-.br
-Default: profile level 0 cut-off value (normalized score if present)
-.RS
-.TP
-Note:
-Compared to release 2.2, an integer value does
-.I not
-force option
-.BR \-r .
-Normalized scores will still be listed in output if an integer cut-off
-is specified on the command line but cut-off level computation will be
-based on raw score.
-.RE
-.\" --- M ---
-.TP
-.BI \-M\  mode_nb
-Normalization mode to use for score computation.
-.br
-The
-.RI ' mode_nb '
-specifies which normalization mode defined in the profile should be used
-to compute the normalized scores for profile to sequence matches. This
-option will override the profile's
-.I PRIORITY
-parameter.
-.br
-If the specified normalization mode does not exist in the profile, an error
-message will be output to standard error and the search is interrupted.
-.br
-Type: integer
-.br
-Default: lowest priority mode defined in the profile
-.\" ------------------------------------------------
-.\" Output modifiers subsection
-.\" ------------------------------------------------
-.SS Ouput modifiers
-.\" --- d ---
-.TP
-.B \-d
-Limit sequence description length.
-.br
-If this option is set, the description of the sequence on the header line
-will be limited in length. If the match information is longer than
-the output width specified using option
-.BR \-W ,
-the sequence description will not be printed. Else the description will be truncated
-to fit the
-.B \-W
-value.
-.br
-By default, the sequence description is not truncated. This option can not be used
-when option
-.B \-k
-is set.
-.\" --- k ---
-.TP
-.B \-k
-Use
-.BR xpsa (5)
-headers for output.
-.br
-When this option is set, all output types 
-.RI ( see
-below) will use
-an
-.BR xpsa (5)
-style header line. This format uses
-.IR keyword = value
-pairs to output alignment parameters. It is useful to transfer information between
-different sequence alignment tools.
-.\" --- s ---
-.TP
-.B \-s
-List the sequences of the matched regions as well. 
-The output will be a Pearson/Fasta-formatted sequence
-library.
-.\" --- v ---
-.TP
-.B \-v
-Suppress sequence/profile parsing warnings.
-If this option is set no warning messages will be printed on
-.IR stderr .
-Only fatal errors will be reported. This option should be used
-with caution.
-.\" --- x ---
-.TP
-.B \-x
-List profile-sequence alignments 
-in
-.BR psa (5)
-format. Please refer to the corresponding man page for more information. 
-.\" --- y ---
-.TP
-.B \-y
-Display alignments between the profile and the matched sequence regions in 
-a human-friendly pairwise alignment format.   
-.\" --- z ---
-.TP
-.B \-z
-Indicate starting and ending position of the matched profile range. The latter
-position will be given as a negative offset from the end of the profile. Thus
-the range [    1,    -1] means entire profile.
-.\" --- W ---
-.TP
-.BI \-W\  width
-Set alignment output width.
-.br
-The value of
-.RI ' width '
-specifies how many residues will be output on one line when any of the
-.BR \-s ,\  \-x \ or\  \-y
-options is set.
-.br
-Type: integer
-.br
-Default: 60
-.\" ------------------------------------------------
-.\" Parameters section
-.\" ------------------------------------------------
-.SH PARAMETERS 
-.TP
-Note:
-for backwards compatibility, release 2.3 of the
-.B pftools
-package will parse the version 2.2 style parameters, but these are
-.I deprecated
-and the corresponding option (refer to the
-.I options
-section) should be used instead.
-.TP
-C=#
-Cut-off value.
-.br
-Use option
-.B \-C
-instead.
-.TP
-W=#
-Output width. 
-.br
-Use option
-.B \-W
-instead.
-.\" ------------------------------------------------
-.\" Examples section
-.\" ------------------------------------------------
-.SH EXAMPLES 
-.TP
-(1)
-.B pfsearch
-\-f \-C 6.0 sh3.prf sh3.seq
-.IP
-Searches the Pearson/Fasta-formatted protein sequence library
-.RI ' sh3.seq '
-for SH3 domains with a cut-off value of 6.0 normalized score units.
-The file
-.RI ' sh3.seq '
-contains 20 SH3 domain-containing protein sequences from
-.SM SWISS-PROT
-release 32.
-The file
-.RI ' sh3.prf '
-contains the
-.SM PROSITE
-entry SH3/PS50002.
-.TP
-(2)
-.B pfsearch
-\-bx ecp.prf CVPBR322 |
-.B psa2msa   
-\-du |    
-.B readseq
-\-p -fMSF > ecp.msf
-.IP
-Generates a multiple sequence alignment  of potential
-.I E. coli
-promoters on both strands of plasmid pBR322.
-The file
-.RI ' ecp.prf ' 
-contains a profile for
-.I E. coli   
-promoters.  
-The file
-.RI ' CVPBR322 '
- contains
-.SM EMBL
-entry J01749|CVPBR322.
-The result file
-.RI ' ecp.msf '
-can further be processed by
-.SM GCG
-programs accepting MSF files as input.
-.\" ------------------------------------------------
-.\" Exit code section
-.\" ------------------------------------------------
-.SH EXIT CODE
-.LP
-On successful completion of its task,
-.B pfsearch
-will return an exit code of 0. If an error occurs, a diagnostic message will be
-output on standard error and the exit code will be different from 0. When conflicting
-options where passed to the program but the task could nevertheless be completed, warnings
-will be issued on standard error.
-.\" ------------------------------------------------
-.\" Bugs section
-.\" ------------------------------------------------
-.SH "BUGS"
-The use of normalized scores as cut-off values can lead to a different behaviour when compared
-to raw scores. This is due to the inherent rounding inaccuracy of real numbers.
-The normalized scores used as cut-offs should be rounded down in order to circumvent this 
-problem.
-.\" ------------------------------------------------
-.\" See also section
-.\" ------------------------------------------------
-.SH "SEE ALSO"
-.BR pfscan (1),
-.BR pfmake (1),
-.BR psa2msa (1),
-.BR psa (5),
-.BR xpsa (5)
-.\" ------------------------------------------------
-.\" Author section
-.\" ------------------------------------------------
-.SH AUTHOR
-The
-.B pftools
-package was developped by Philipp Bucher.
-.br
-Any comments or suggestions should be addressed to <pftools at isb-sib.ch>.
diff --git a/man/pfsearchV2.1 b/man/pfsearchV2.1
new file mode 100644
index 0000000..1b298f9
--- /dev/null
+++ b/man/pfsearchV2.1
@@ -0,0 +1,133 @@
+.TH PFSEARCHV2 1 "February 1998" "pftools 2.1"
+.SH NAME
+pfsearchV2 \- search a protein or DNA sequence library for sequence segments 
+matching a profile
+.SH SYNOPSIS
+.B pfsearchV2 
+[ -abflLrsuxyz ] [ profile-file | - ]
+            [ seq-library-file | - ]    [C=#] [W=#] 
+.SH DESCRIPTION
+.B pfsearchV2 
+compares a query profile against a DNA or protein sequence library.
+The result is an unsorted list of profile-sequence matches written to the standard output. 
+A variety of output formats containing different informations can be specified 
+via the options 
+.I -a, -l,  -L, -r, -u, -s,
+.I -x, -y, -z,
+and the command-line parameter 
+.I C=#.
+.I profile-file
+contains a profile in PROSITE format.
+.I seq-library-file
+contains a sequence library in EMBL/SWISS-PROT
+format (assumed by default) or in Pearson/Fasta
+format (indicated by option 
+.I -f). 
+.B pfsearchV2 
+can be used as a filter if - is used instead of one of the input 
+filenames. 
+.SH OPTIONS 
+.TP
+\-a
+Report optimal alignment scores for 
+all sequences regardless of the cut-off value. 
+This option simultaneously forces DISJOINT=UNIQUE.   
+.TP
+\-b
+Search the complementary strands of DNA sequences as well.
+.TP
+\-f
+Input sequence-library is in Pearson/Fasta format.
+.TP
+\-l
+Indicate by number the highest cut-off level exceeded by the
+match score in the output list. 
+.TP
+\-L
+Indicate by character string the highest cut-off level exceeded by the match score
+in the output list. Note that the generalized profile format includes a text
+string field to specify a name for a cut-off level. The \-L option causes the
+program to display the first two characters of this text string 
+(usually something like "!", "?", "??", etc.) at the beginning of
+each match description. 
+.TP
+\-r
+Use raw scores rather than normalized 
+scores for match selection. Normalized scores 
+will not be listed in the output. 
+.TP
+\-s
+List the sequences of the matched regions as well. 
+The output will be a Pearson/Fasta-formatted sequence
+library.
+.TP
+\-u
+Forces DISJOINT=UNIQUE. 
+.TP
+\-x
+List profile-sequence alignments 
+in pftools PSA format.  
+.TP
+\-y
+Display alignments between the profile and the matched sequence regions in 
+a human-friendly format.   
+.TP
+\-z
+Indicate starting and ending position of the matched profile range. The latter
+position will be given as a negative offset from the end of the profile. Thus
+the range [    1,    -1] means entire profile.
+.SH PARAMETERS 
+.TP
+C=#
+Cut-off value.
+Over-writes the level zero cut-off value specified in
+the profile.
+An integer argument is interpreted as a raw score value,
+a decimal argument as a normalized score value. An integer value 
+forces option 
+\-r.
+.TP
+W=#
+Output width. 
+Output lines will be truncated after 
+.I W
+characters. 
+Default: W=132. 
+.SH EXAMPLES 
+.TP
+(1)
+.B pfsearchV2
+\-f sh3.prf sh3.seq C=6.0
+
+Searches the Pearson/Fasta-formatted protein sequence library sh3.seq
+for SH3 domains with a cut-off value of 6.0 normalized score units.
+sh3.seq contains 20 SH3 domain-containing protein sequences from SWISS-PROT
+release 32.
+sh3.prf contains the PROSITE entry SH3/PS50002.
+.TP
+(2)
+.B pfsearchV2
+\-bx ecp.prf CVPBR322 |
+.B psa2msa   
+\-du |    
+.B readseq
+\-p -fMSF > ecp.msf
+
+Generates a multiple sequence alignment  of potential
+.I E. coli
+promoters on both strands of plasmid pBR322.
+ecp.prf contains a profile for
+.I E. coli   
+promoters.  
+CVPBR322 contains EMBL entry J01749|CVPBR322.
+The result file
+.I ecp.msf   
+can further be processed by GCG programs accepting MSF files as input.
+
+.I See
+also manual pages of 
+.B psa2msa. 
+.SH AUTHOR
+Philipp Bucher
+.br
+Philipp.Bucher at isrec.unil.ch
diff --git a/man/pfw.1 b/man/pfw.1
index 03c2626..2da9ff1 100644
--- a/man/pfw.1
+++ b/man/pfw.1
@@ -1,222 +1,48 @@
-.\"
-.\" $Id: pfw.1,v 1.1 2003/05/12 11:50:03 vflegel Exp $
-.\" Copyright (c) 2003 Swiss Institute of Bioinformatics <pftools at isb-sib.ch>
-.\" Process this file with
-.\" groff -man -Tascii <name>
-.\" for ascii output or
-.\" groff -man -Tps <name>
-.\" for postscript output
-.\"
-.TH PFW 1 "May 2003" "pftools 2.3" "pftools"
-.\" ------------------------------------------------
-.\" Name section
-.\" ------------------------------------------------
+.TH PFW 1 "February 1998" "pftools 2.1"
 .SH NAME
 pfw \- weight sequences of a multiple sequence alignment
-.\" ------------------------------------------------
-.\" Synopsis section
-.\" ------------------------------------------------
 .SH SYNOPSIS
-.TP 10
 .B pfw
-[
-.B \-hm
-] [
-.B \-N
-.I shuffles
-] [
-.B \-R
-.I seed
-] [
-.B \-W
-.I weight
-] [
-.B \-X
-.I gap_excision
-] [
-.I ms_file
-|
-.B \-
-] [
-.I parameters
-]
-.\" ------------------------------------------------
-.\" Description section
-.\" ------------------------------------------------
+[ msf-file | - ] [N=#] [X=#] [R=#] [W=#]
 .SH DESCRIPTION
 .B pfw 
 computes new weights for individual sequences in a multiple sequence alignment
 using the method of Sibbald and Argos (1990).
-The file containing the multiple sequence alignment
-.RI (' ms_file ')
-must be either in MSF format as generated by
-.SM GCG
-programs or by
-.B readseq
-(checksums are ignored) or in MSA format as
-produced by
-.BR psa2msa (1).
-If
-.RB ' \- '
-is specified instead of a filename, the multiple sequence alignment is read 
+The file containing the multiple sequence alignment (msf-file) must be
+in MSF format as generated by GCG programs or by readseq (checksums are ignored).
+If `-' is specified instead
+of a real filename, the multiple sequence alignment is read 
 from the standard input.  
 .B pfw
-writes a new multiple sequence alignment with modified weights in either MSF or
-MSA format to the standard output.
-.\" ------------------------------------------------
-.\" Options section
-.\" ------------------------------------------------
-.SH OPTIONS 
-.\" --- ms_file ---
-.TP
-.I ms_file
-Input multiple sequence alignment file.
-.br
-This file contains a multiple sequence alignment in either MSF (default) 
-or MSA format. If the format is MSA,
-.B pfw
-will include the new weight of each sequence in the
-.SM FASTA
-header using the
-.BR xpsa (5)
-keyword
-.IR weight .
-It will thus replace any existing
-.IR weight = value
-pair in the header line.
-If the filename is replaced by a
-.RB ' \- ',
-.B pfw
-will read the multiple alignment from
-.BR stdin .
-.\" --- h ---
-.TP
-.B \-h
-Display usage help text.
-.\" --- m ---
-.TP
-.B \-m
-Input multiple sequence alignment is in MSA format.
-.\" --- N ---
-.TP
-.BI \-N\  shuffles
-Number of shuffles per sequence to be performed.
-.br
-Note that an average relative precision of
-.I r
-percent is achieved by approximately
-.RI (100/ r )-squared
-shuffles.
-.br
-Type: integer
-.br
-Default: 100 (10% precision)
-.\" --- R ---
-.TP
-.BI \-R\  seed
-Seed for the random number generator.
-.br
-This must be a negative integer
-(zero or positive integers will be reset to negative integers).
-.br
-Type: integer
-.br
-Default: -123456789 
-.\" --- W ---
-.TP
-.BI \-W\  weight
-Total weight.
-.br
-The initially computed weights will be multiplied by a constant
-factor such that the sum of all weights equals this value. 
-.br
-Default: 1 
-.\" --- X ---
-.TP
-.BI \-X\  gap_excision
-Gap excision threshold.
-.br
-This is the minimal fraction of non-gap characters
-a column of the multiple sequence alignment must contain 
-in order to be considered for weighting.
-.br
-Default: 0.5 
-.\" ------------------------------------------------
-.\" Parameters section
-.\" ------------------------------------------------
+writes a new msf-file with modified weights to the standard output.
 .SH PARAMETERS
 .TP
-Note:
-for backwards compatibility, release 2.3 of the
-.B pftools
-package will parse the version 2.2 style parameters, but these are
-.I deprecated
-and the corresponding option (refer to the
-.I options
-section) should be used instead.
-.TP
 N=#
-Shuffles per sequence.
-.br
-Use option
-.B \-N
-instead.
+Number of shuffles per sequence to be performed. Note that
+an average relative precision of \fIr\fP percent is achieved by approximately
+(100/\fIr\fP)-squared shuffles. Default: N=100 (10% precision). 
+.TP
+X=#
+Gap excision threshold. This is the minimal fraction of non-gap characters
+a column of the multiple sequence alignment must contain 
+in order to be considered for weighting. Default: X=0.5. 
 .TP
 R=#
-Random number seed.
-.br
-Use option
-.B \-R
-instead.
+Seed for the random number generator. This must be an negative integer
+(zero or positive integers will be reset to negative integers). Default=-123456789. 
 .TP
 W=#
-Total weight.
-.br
-Use option
-.B \-W
-instead.
-.TP
-X=#
-Gap excision threshold.
-.br
-Use option
-.B \-X
-instead.
-.\" ------------------------------------------------
-.\" Exit code section
-.\" ------------------------------------------------
-.SH EXIT CODE
-.LP
-On successful completion of its task,
-.B pfw
-will return an exit code of 0. If an error occurs, a diagnostic message will be
-output on standard error and the exit code will be different from 0. When conflicting
-options where passed to the program but the task could nevertheless be completed, warnings
-will be issued on standard error.
-.\" ------------------------------------------------
-.\" References section
-.\" ------------------------------------------------
-.SH REFERENCES
+Total weight. The initially computed weights will be multiplied by a constant
+factor such that the sum of all weights equals this value. 
+Default: W=1. 
 .LP
-Sibbald PR & Argos P. (1990).
+Sibbald PR & Argos P (1990).
 .I Weighting aligned protein or nucleic
 .I acid sequences to correct for
 .I unequal representation.
 J. Mol. Biol.
-.BR 216 :813-818.
-.\" ------------------------------------------------
-.\" See also section
-.\" ------------------------------------------------
-.SH "SEE ALSO"
-.BR psa2msa (1),
-.BR psa (5),
-.BR xpsa (5)
-.\" ------------------------------------------------
-.\" Author section
-.\" ------------------------------------------------
+\fB216\fR:813-818.
 .SH AUTHOR
-The
-.B pftools
-package was developped by Philipp Bucher.
+Philipp Bucher
 .br
-Any comments or suggestions should be addressed to <pftools at isb-sib.ch>.
+Philipp.Bucher at isrec.unil.ch
diff --git a/man/psa.5 b/man/psa.5
deleted file mode 100644
index 10bfc62..0000000
--- a/man/psa.5
+++ /dev/null
@@ -1,197 +0,0 @@
-.\"
-.\" $Id: psa.5,v 1.1 2003/05/12 11:51:45 vflegel Exp $
-.\" Copyright (c) 2003 Swiss Institute of Bioinformatics <pftools at isb-sib.ch>
-.\" Process this file with
-.\" groff -man -Tascii <name>
-.\" for ascii output or
-.\" groff -man -Tps <name>
-.\" for postscript output
-.\"
-.TH PSA 5 "April 2003" "pftools 2.3" "File formats"
-.\" ------------------------------------------------
-.\" Name section
-.\" ------------------------------------------------
-.SH NAME
-psa \- biological sequence alignment file format
-.\" ------------------------------------------------
-.\" Description section
-.\" ------------------------------------------------
-.SH DESCRIPTION
-.B psa
-is an output format used by the
-.B pftools
-package to describe alignments between biological sequences (DNA or protein) and
-.I PROSITE
-profiles.
-.PP
-.B psa
-is apparented to the widely used biological sequence file format
-.IR fasta .
-Nevertheless it does not only describe a biological sequence, it is especially used to include
-information of alignments between a motif descriptor like a
-.I PROSITE
-profile and a given sequence. This information is included in the header and reflected
-in the structure of the sequence following the header line.
-.\" ------------------------------------------------
-.\" Syntax section
-.\" ------------------------------------------------
-.SH SYNTAX
-Each sequence in a
-.B psa
-alignment file or output must be preceded by a
-.I fasta
-header line.
-.br
-The general syntax of such a
-.I fasta
-header line is as follows:
-.sp
-.RS
-.BI > seq_id
-.RI "[ " free_text " ]" 
-.RE
-.sp
-The header must start with a
-.RB ' > '
-character which is directly followed by the
-.I seq_id
-field. This field is interpreted by most programs as the sequence's
-.I identifier
-and/or
-.I accession
-number. It ends at the first encountered whitespace character.
-.br
-The
-.B pftools
-programs will use the
-.I free_text
-to add information about the match score, position and description of the sequence or motif.
-Please refer to the man page of the corresponding programs for further information about
-the output formats.
-.br
-The header can only extend over one line. The following lines up to a new line starting with a
-.RB ' > '
-character or the end of the file are interpreted as sequence data.
-.sp
-The line following the header, starts the alignment data between a sequence and a 
-.I PROSITE
-profile. This data can span over several lines of different length.
-.br
-The data is formed by
-.I upper
-or
-.IR lower -case
-characters of the corresponding sequence alphabet (DNA or protein).
-The gap characters
-.RB ' . "' and '" - '
-are also supported.
-.br
-The alignment always has at least the length of the matching profile. Insertions or deletions
-detected during the motif/sequence alignment step will vary the length of the data reported,
-and can be identified using the following conventions:
-.RS
-.\" --- upper-case character ---
-.TP
-.I upper-case character
-Any upper-case character of the sequence alphabet identifies a
-.I match
-position between the sequence and the motif descriptor.
-.\" --- lower-case character ---
-.TP
-.I lower-case character
-A lower-case character of the sequence alphabet is used to symbolize an
-.I insertion
-in the sequence compared to the motif descriptor.
-.\" --- dash '-' character ---
-.TP
-.I '-' (dash) character
-A
-.RB ' - '
-character in the output identifies the presence of a
-.I deletion
-in the sequence compared to the motif descriptor.
-.RE
-.\" ------------------------------------------------
-.\" Examples section
-.\" ------------------------------------------------
-.SH EXAMPLES
-.TP
-(1)
->YD28_SCHPO 556 pos. 291 - 332 sp|Q10256|YD28_SCHPO
-.br
-PTDPGlnsKIAQLVSMGFDPLEAAQALDAANGDLDVAASFLL--
-.br
-
-This is an example of the output produced by
-.BR pfsearch (1)
-using the '-x' (i.e. 
-.B psa
-output) option. The first line starting with the
-.RB ' > '
-character is the
-.I fasta
-header. It also contains information about the raw score of the alignment as well as its
-position in the input sequence.
-.br
-On the next line you find the alignment proper. Starting at position 6, we can find an
-.I insertion
-of the
-.RI ' lns '
-residues in the sequence compared to the motif. The last two positions of the motif are
-not present in the sequence (i.e. they are
-.IR deleted ).
-This is indicated by the presence of two 
-.RB ' - '
-(dash) characters at the end of the alignment.
-.RE
-.\" ------------------------------------------------
-.\" Notes section
-.\" ------------------------------------------------
-.SH "NOTES"
-.TP
-(1)
-The
-.BR xpsa (5)
-format defines a more strict syntax of the header line, allowing the exchange of information between
-different sequence analysis tools. It uses
-.IR keyword = value
-pairs to annotate the current match between a sequence and a motif descriptor. This syntax can be
-easily parsed and extended, according to the needs of bioinformatic tools.
-.RE
-
-.TP
-(2)
-The current implementation of the
-.B pftools
-package does not use the
-.RB ' . '
-(dot) character in the 
-.B psa
-output. Nevertheless
-.BR psa2msa (1)
-will read it and interpret it in the same manner as the
-.RB ' - '
-(dash) character.
-.RE
-.\" ------------------------------------------------
-.\" See also section
-.\" ------------------------------------------------
-.SH "SEE ALSO"
-.BR xpsa (5),
-.BR pfsearch (1),
-.BR pfscan (1),
-.BR pfw (1),
-.BR pfmake (1),
-.BR psa2msa (1)
-.\" ------------------------------------------------
-.\" Author section
-.\" ------------------------------------------------
-.SH "AUTHOR"
-This manual page was originally written by Volker Flegel.
-.br
-The
-.B pftools
-package was developped by Philipp Bucher.
-.br
-Any comments or suggestions should be addressed to <pftools at isb-sib.ch>.
-
diff --git a/man/psa2msa.1 b/man/psa2msa.1
index ae7a911..27218cf 100644
--- a/man/psa2msa.1
+++ b/man/psa2msa.1
@@ -1,247 +1,80 @@
-.\"
-.\" $Id: psa2msa.1,v 1.2 2003/08/11 12:09:14 vflegel Exp $
-.\" Copyright (c) 2003 Swiss Institute of Bioinformatics <pftools at isb-sib.ch>
-.\" Process this file with
-.\" groff -man -Tascii <name>
-.\" for ascii output or
-.\" groff -man -Tps <name>
-.\" for postscript output
-.\"
-.TH PSA2MSA 1 "August 2003" "pftools 2.3" "pftools"
-.\" ------------------------------------------------
-.\" Name section
-.\" ------------------------------------------------
+.TH PSA2MSA 1 "June 1999" "pftools 2.2"
 .SH NAME
 psa2msa \-  reformat PSA file to Pearson/Fasta multiple sequence alignment file 
-.\" ------------------------------------------------
-.\" Synopsis section
-.\" ------------------------------------------------
 .SH SYNOPSIS
-.TP 10
 .B psa2msa 
-[
-.B \-dhlpu
-] [
-.B \-M
-.I insert_len
-] [
-.B \-W
-.I width
-] [
-.I psa_file
-|
-.B \-
-] [
-.I parameters
-]
-.\" ------------------------------------------------
-.\" Description section
-.\" ------------------------------------------------
+[ -dlpu ] [ [ psa-file | - ] ]   [ M=#]
 .SH DESCRIPTION
 .B psa2msa
-reformats a
-.BR psa (5)
-formatted profile-sequence alignment file into a
+reformats a PSA-formatted profile-sequence alignment file into a
 Pearson/Fasta-formatted multiple sequence alignment file.
 The result is written to the standard output. 
-.RI ' psa_file '
+.I psa-file
 contains alignments of several sequence segments to the same profile 
-in
-.BR psa (5)
-format. Such a file is typically generated by the programs
-.BR pfsearch (1)
-or
-.BR pfscan (1)
+in PSA format. 
+Such a file is typically generated by program 
+.B pfsearch  
 using option
-.BR \-x .
-The output can be converted into other formats
-.RI ( e.g. 
+.I -x.
+The output can be converted into other formats (
+.I e.g. 
 MSF) with the aid of the public domain
 program
 .B readseq
-(available from
-.IR ftp://ftp.bio.indiana.edu/molbio/readseq )
-or used directly with
-.BR pfmake (1)
-or
-.BR pfw (1). 
-If
-.RB ' \- '
-is specified instead of a filename, the
-.BR psa (5)
-alignment is read from the standard input.
-.\" ------------------------------------------------
-.\" Options section
-.\" ------------------------------------------------
-.SH OPTIONS
-.\" --- psa_file ---
-.TP
-.I psa_file
-Input multiple sequence alignment.
-.br
-The content of the file must be in
-.BR psa (5)
-format.
-If the filename is replaced by a
-.RB ' \- ',
+(available from ftp.bio.indiana.edu:/molbio/readseq). 
 .B psa2msa
-will read the input alignment from
-.BR stdin .
-.\" --- d ---
-.TP
-.B \-d
-Replace periods
-.RB ' . '
-by dashes
-.RB ' \- '
-on output.
-.\" --- h ---
+can be used as a filter if - is used instead of the input
+filename, or if the input filename is omitted. 
+.SH OPTIONS
 .TP
-.B \-h
-Display usage help text.
-.\" --- l ---
+\-d
+Replace periods by dashes on output.
 .TP
-.B \-l
+\-l
 Replace upper case letters by lower case letters on output.
-.\" --- p ---
 .TP
-.B \-p
-Replace dashes
-.RB ' \- '
-by periods
-.RB ' . '
-on output.
-.\" --- u ---
+\-p
+Replace dashes by periods on output.
 .TP
-.B \-u
+\-u
 Replace lower case letters by upper case letters on output.
-.\" --- M ---
+.SH PARAMETERS
 .TP
-.BI \-M\  insert_len
+M=#
 Maximal length of an insertion.
-.br
 If the real length of an insertion exceeds this value, the excess number 
-of residues will be deleted from the center of the insertion. 
-A negative value of
-.RI ' insert_len '
-means no upper limit for the length of an insertion
-.RI ( i.e.
-no residues will be deleted from an insertion).
-If 
-.RI ' insert_len '
-is zero, all insert positions will be removed.
+of residues will be deleted from the center 
+of the insertion. 
+.I M=0
+means no upper limit for the length of an insertion.
 Setting an insertion length limit helps to keep the resulting alignment
-at manageable size.
-.br
-Type: integer
-.br 
-Default: -1 
-.RS
-.TP
-Note:
-The meaning of the value
-.RI ' 0 '
-for this parameter has been changed compared to version 2.2 of the
-.B pftools
-package.
-.RE
-.\" --- W ---
-.TP
-.BI \-W\  width
-Set alignment output width.
-.br
-The value of
-.RI ' width '
-specifies how many residues will be output on one line.
-.br
-Type: integer
-.br
-Default: 60
-.\" ------------------------------------------------
-.\" Parameters section
-.\" ------------------------------------------------
-.SH PARAMETERS
-.TP
-Note:
-for backwards compatibility, release 2.3 of the
-.B pftools
-package will parse the version 2.2 style parameters, but these are
-.I deprecated
-and the corresponding option (refer to the
-.I options
-section) should be used instead.
-.TP
-M=#
-Maximal insertion length
-.br
-Use option
-.B \-M
-instead.
-.TP
-W=#
-Output width.
-.br
-Use option
-.B \-W
-instead.
-.\" ------------------------------------------------
-.\" Examples section
-.\" ------------------------------------------------
+at manageable size. 
+Default: M=0. 
 .SH EXAMPLES
 .TP
 (1)
 .B pfsearch
-\-bx ecp.prf CVPBR322 | 
+-bx ecp.prf CVPBR322 | 
 .B psa2msa
-\-du |
+-du |
 .B readseq
-\-p \-fMSF > ecp.msf
-.IP
+-p -fMSF > ecp.msf
+
 Generates a multiple sequence alignment of predicted
 .I E. coli
 promoters on both strands of plasmid pBR322.
-The file
-.RI ' ecp.prf '
-contains a profile for 
+ecp.prf contains a profile for 
 .I E. coli
 promoters.  
-The file
-.RI ' CVPBR322 '
-contains
-.SM EMBL
-entry J01749|CVPBR322.
+CVPBR322 contains EMBL entry J01749|CVPBR322.
 The result in
-.RI ' ecp.msf '
-can further be processed by
-.SM GCG
-programs accepting MSF files as input.
-.\" ------------------------------------------------
-.\" Exit code section
-.\" ------------------------------------------------
-.SH EXIT CODE
-.LP
-On successful completion of its task,
-.B psa2msa
-will return an exit code of 0. If an error occurs, a diagnostic message will be
-output on standard error and the exit code will be different from 0. When conflicting
-options where passed to the program but the task could nevertheless be completed, warnings
-will be issued on standard error.
-.\" ------------------------------------------------
-.\" See also section
-.\" ------------------------------------------------
-.SH "SEE ALSO"
-.BR pfscan (1),
-.BR pfsearch (1),
-.BR pfmake (1),
-.BR pfw (1),
-.BR psa (5),
-.BR xpsa (5)
-.\" ------------------------------------------------
-.\" Author section
-.\" ------------------------------------------------
+.I ecp.msf
+can further be processed by GCG programs accepting MSF files as input.
+
+.I See
+also manual pages of
+.B pfsearch. 
 .SH AUTHOR
-The
-.B pftools
-package was developped by Philipp Bucher.
+Philipp Bucher
 .br
-Any comments or suggestions should be addressed to <pftools at isb-sib.ch>.
+Philipp.Bucher at isrec.unil.ch
diff --git a/man/ptof.1 b/man/ptof.1
index e6967e0..6cae9c0 100644
--- a/man/ptof.1
+++ b/man/ptof.1
@@ -1,79 +1,31 @@
-.\"
-.\" $Id: ptof.1,v 1.2 2003/08/11 12:09:14 vflegel Exp $
-.\" Copyright (c) 2003 Swiss Institute of Bioinformatics <pftools at isb-sib.ch>
-.\" Process this file with
-.\" groff -man -Tascii <name>
-.\" for ascii output or
-.\" groff -man -Tps <name>
-.\" for postscript output
-.\"
-.TH PTOF 1 "August 2003" "pftools 2.3" "pftools"
-.\" ------------------------------------------------
-.\" Name section
-.\" ------------------------------------------------
+.TH PTOF 1 "July 1999" "pftools 2.2"
 .SH NAME
 ptof \- convert a protein profile into a frame-search profile  
-.\" ------------------------------------------------
-.\" Synopsis section
-.\" ------------------------------------------------
+
 .SH SYNOPSIS
-.TP 10
-.B ptof
-[
-.B \-hlr
-] [
-.B \-B
-.I init/term_score
-] [
-.B \-F
-.I frameshift
-] [
-.B \-I
-.I insert_multiplier
-] [
-.B \-X
-.I stop_codon
-] [
-.B \-Y
-.I intron_open
-] [
-.B \-Z
-.I intron_extend
-] [
-.I protein_profile
-|
-.B \-
-] [
-.I parameters
-]
-.\" ------------------------------------------------
-.\" Description section
-.\" ------------------------------------------------
+.B ptof 
+[ -r ] [ protein-profile ] [B=#] [F=#] [I=#] [X=#] [Y=#] [Z=#] 
 .SH DESCRIPTION
 .B ptof
 converts a protein profile (generated for instance by pftools
 programs 
-.BR pfmake (1), 
-.BR gtop (1)
+.B pfmake, 
+.B gtop
 or
-.BR htop (1))
-into a so-called
-.RI \(dq frame-search\ profile \(dq.
-A frame-search profile is used to search an
-.RI \(dq interleaved\ frame-translated \(dq
-DNA sequence (generated by pftools program
-.BR 2ft (1))
+.B htop)
+into a so-called "frame-search profile".
+A frame-search profile is used to search an "interleaved frame-translated" DNA sequence
+(generated by pftools program
+.B 2ft)
 for occurrences of a protein sequence motif.
-An
-.RI \(dq interleaved\ frame-translated \(dq
-DNA sequence is an amino acid sequence corresponding to the 
+An "interleaved frame-translated" DNA sequence
+is an amino acid sequence corresponding to the 
 .I N-2
-overlapping codons of a DNAsequence of length
-.IR N .
-Note that in such a sequence, the character
-.RB ' O '
-is used to represent stop codons.
-.LP
+overlapping codons of a DNA
+sequence of length
+.I N.
+Note that in such a sequence, the character "O" is used to represent stop codons.
+
 The conversion procedure works as follows: The protein profile is 
 expanded in length by a factor of three to accommodate three translated
 codons per original match position.
@@ -83,235 +35,115 @@ The original insert positions are placed between pairs of adjacent dummy match p
 The initiation, termination, and transition scores of the original insert
 positions are left unchanged; the
 insert extension scores are divided by a factor of 3, or by the value of the command-line
-option 
-.BR \-I .  
+parameter 
+.I I.  
 The two insert positions flanking the significant match positions 
 serve to accommodate frame-shift errors and introns, respectively.
 The frame-shift insert position allows free insertion opening combined
-with a high insert extension penalty (command-line option 
-.BR \-F ) 
+with a high insert extension penalty (command-line parameter 
+.I F) 
 whereas the intron insertion position has high opening but low extension penalties
-(command line options 
-.B \-Y
+(command line parameters 
+.I Y
 and
-.BR \-Z ).
+.I Z).
 The deletion opening and closing penalties next to the significant 
 match positions are set to values that ensure that the total cost of a single-base
 deletion is the same as the cost of  
 a single base-insertion at a frame-shift insert position.
-Furthermore, the alphabet of the original profile is extended by the stop codon symbol
-.RB ' O ' 
-which is assigned a constant negative value (command-line option
-.BR \-X )
-at significant match positions, and zero at dummy match positions. At insert positions,
-it is set to the average of the other insert extension scores.
-.\" ------------------------------------------------
-.\" Options section
-.\" ------------------------------------------------
+Furthermore, the alphabet of the original profile is extended by the stop codon symbol "O" 
+which is assigned a constant negative value (command-line parameter
+.I X)
+at significant
+match positions, and zero at dummy match positions. At insert positions, it is set to the
+average of the other insert extension scores.
 .SH OPTIONS
-.\" --- protein_profile ---
-.TP
-.I protein_profile
-Input protein profile.
-.br
-The protein profile contained in this file will be converted into a frame-search profile.
-If the filename is replaced by a
-.RB ' \- ',
-.B ptof
-will read the profile from
-.BR stdin .
-.\" --- h ---
-.TP
-.B \-h
-Display usage help text.
-.\" --- l ---
 .TP
-.B \-l
-Remove output line length limit. Individual lines of the output profile
-can exceed a length of 132 characters, removing the need to wrap them over several lines. 
-.\" --- r ---
-.TP
-.B \-r
+\-r
 Frame-search parameters are given in normalized score units. This option
 will only be considered if a linear normalization function with
 priority over all other normalization functions is specified 
 in the profile. 
 In this case, the frame-search scores specified on the command line will be 
-divided by the slope
-.RI ( R2
-parameter) of the normalization function. 
+divided by the slope (R2 parameter) of the normalization
+function. 
 This option is particularly useful for profiles which are 
 already scaled in units that can be interpreted as \(miLog(P)-values, 
 .I e.g.
 bits.  
-.\" --- B ---
+.SH PARAMETERS
 .TP
-.BI \-B\  init/term_score
-Minimal initiation and termination score.
-.br
-All internal and external initiation and termination scores will be set to this 
+B=#
+Minimal insertion and termination score. All internal and external
+initiation and termination scores will be set to this 
 value if the corresponding value in the original profile is lower than 
 this value.
 This parameter is used to impose a more
 local alignment behavior on the frame-search profile in order to
 deal with discontinuities in DNA sequences (long introns,
 alternative splicing, chimeric clones, 
-.IR etc. )
-.br 
-Default: \-50 (\-0.5 with option
-.BR \-r )
-.\" --- F ---
+.I etc.)   
+Default: B=\(mi50(\(mi0.5 with option -r).
 .TP
-.BI \-F\  frameshift
-Frame-shift error penalty.
-.br
-Default: \-100 (\-1.0 with option
-.BR \-r ) 
-.\" --- I ---
+F=#
+Frame-shift error penalty. Default: F=\(mi100(\(mi1.0 with option -r). 
 .TP
-.BI \-I\  insert_multiplier
-Insert score multiplier.
-.br
-The values of the original
+F=#
+Insert score multiplier. The values of the original
 insert extension scores will be multiplied by this
 factor in order to compensate for the fact that 
 a single amino acid corresponds to three overlapping
 codon positions in the target sequence.
-.br
-Default: 1/3
-.\" --- X ---
-.TP
-.BI \-X\  stop_codon
-Stop codon penalty.
-.br
-Default: \-100 (\-1.0 with option
-.BR -r )
-.\" --- Y ---
-.TP
-.BI \-Y\  intron_open
-Intron opening penalty.
-.br
-Default: \-300 (\-3.0 with option
-.BR \-r ) 
-.\" --- Z ---
-.TP
-.BI \-Z\  intron_extend
-Intron extension penalty.
-.br
-Default: \-1 (\-0.01 with option
-.BR \-r )
-.\" ------------------------------------------------
-.\" Parameters section
-.\" ------------------------------------------------
-.SH PARAMETERS
-.TP
-Note:
-for backwards compatibility, release 2.3 of the
-.B pftools
-package will parse the version 2.2 style parameters, but these are
-.I deprecated
-and the corresponding option (refer to the
-.I options
-section) should be used instead.
-.TP
-B=#
-Minimal initiation and termination score.
-.br
-Use option
-.B \-B
-instead.
-.TP
-F=#
-Frame-shift error penalty.
-.br
-Use option
-.B \-F
-instead.
-.TP
-I=#
-Insert score multiplier.
-.br
-Use option
-.B \-I
-instead.
+Default: I=1/3.
 .TP
 X=#
 Stop codon penalty.
-.br
-Use option
-.B \-X
-instead.
+Default: X=\(mi100(\(mi1.0 with option -r)
 .TP
 Y=#
 Intron opening penalty.
-.br
-Use option
-.B \-Y
-instead.
+Default: Y=\(mi300(\(mi3.0 with option -r). 
 .TP
 Z=#
 Intron extension penalty.
-.br
-Use option
-.B \-Z
-instead.
-.\" ------------------------------------------------
-.\" Examples section
-.\" ------------------------------------------------
+Default: Z=\(mi1(\(mi0.01 with option -r)
 .SH EXAMPLES
 .TP
 (1)
 .B ptof
-\-r \-F -1.2 \-I 0.6 \-X -1.5 \-B -0.5 sh3.prf > sh3.fsp
+-r sh3.prf F=\(mi1.2 I=0.6 X=\(mi1.5 B=\(mi0.5 > sh3.fsp
 .br
-.B 2ft \-
+.B 2ft
 < R76849.seq | 
 .B pfsearch 
-\-fy \-C 5.0 sh3.fsp \- 
-.IP
+-fy  sh3.fsp - C=5.0 
+
 The protein domain profile in 
-.RI ' sh3.prf '
+.I sh3.prf
 is first converted into a frame-search profile 
-.RI ' sh3.fsp '.
+.I sh3.fps.
 Then both strands of the Fasta-formatted EST sequence in
-.RI ' R76849.seq '
+.I R76849.seq
 (GenBank/EMBL-accession: R76849) are converted into interleaved frame-translated
 protein sequences and searched for SH3 domains with the frame-search profile 
 generated in the preceding step.
-.IP
+
 The output may be compared to the result of a more conventional
 search strategy using a protein profile in conjunction with a six-frame
 translation of the same DNA sequence:
-.IP
-.B 6ft \-
+
+.B 6ft 
 < R76849.seq | 
 .B pfsearch 
-\-fy \-C 5.0 sh3.prf \-
-.\" ------------------------------------------------
-.\" Exit code section
-.\" ------------------------------------------------
-.SH EXIT CODE
-.LP
-On successful completion of its task,
-.B ptof
-will return an exit code of 0. If an error occurs, a diagnostic message will be
-output on standard error and the exit code will be different from 0. When conflicting
-options where passed to the program but the task could nevertheless be completed, warnings
-will be issued on standard error.
-.\" ------------------------------------------------
-.\" See also section
-.\" ------------------------------------------------
-.SH "SEE ALSO"
-.BR pfscan (1),
-.BR pfsearch (1),
-.BR 2ft (1),
-.BR 6ft (1)
-.\" ------------------------------------------------
-.\" Author section
-.\" ------------------------------------------------
+-fy  sh3.prf - C=5.0 
+
+.I See
+also manual pages of
+.B pfsearch,
+.B 2ft
+and 
+.B 6ft.
 .SH AUTHOR
-The
-.B pftools
-package was developped by Philipp Bucher.
-.br
-Any comments or suggestions should be addressed to <pftools at isb-sib.ch>.
+.nf
+Philipp Bucher
+Philipp.Bucher at isrec.unil.ch
diff --git a/man/ptoh.1 b/man/ptoh.1
index 7b866e6..0e5656b 100644
--- a/man/ptoh.1
+++ b/man/ptoh.1
@@ -1,158 +1,56 @@
-.\"
-.\" $Id: ptoh.1,v 1.1 2003/05/12 11:50:03 vflegel Exp $
-.\" Copyright (c) 2003 Swiss Institute of Bioinformatics <pftools at isb-sib.ch>
-.\" Process this file with
-.\" groff -man -Tascii <name>
-.\" for ascii output or
-.\" groff -man -Tps <name>
-.\" for postscript output
-.\"
-.TH PTOH 1 "April 2003" "pftools 2.3" "pftools"
-.\" ------------------------------------------------
-.\" Name section
-.\" ------------------------------------------------
+.TH PTOH 1 "February 1998" "pftools 2.2"
 .SH NAME
-ptoh \- converts a
-.SM PROSITE
-formatted profile into an approximately equivalent HMM
-.\" ------------------------------------------------
-.\" Synopsis section
-.\" ------------------------------------------------
+ptoh \- converts a PROSITE-formatted profile into an approximately equivalent HMM
 .SH SYNOPSIS
-.TP 10
-.B ptoh
-[
-.B \-fFhs
-] [
-.B \-D
-.I del_to_del
-] [
-.B \-I
-.I ins_to_ins
-] [
-.B \-L
-.I log_base
-] [
-.I profile
-|
-.B \-
-] [
-.I random_model
-] [
-.I parameters
-]
-.\" ------------------------------------------------
-.\" Description section
-.\" ------------------------------------------------
+.LP
+.nf
+\fBptoh\fP [ -fFhs ] [ profile-file | - ] [ random-model-file ] [L=#]
+        [I=#] [D=#] 
+.fi
 .SH DESCRIPTION
 .B ptoh
-converts a
-.SM PROSITE
-formatted generalized profile into an approximately equivalent
-.SM HMMER1
-(default) or
-.SM SAM 
-formatted hidden Markov model (HMM).
-The file
-.RI ' profile '
-is a nucleic acid or protein profile in
-.SM PROSITE
-format. If
-.RB ' \- '
-is specified instead of a filename, the profile is read from the standard input.
-The
-.RI random_model
-file contains a simple null-model in the format used by the HMM search programs
-of the
-.SM HMMER1
-package.
+converts a PROSITE-formatted generalized profile into an approximately equivalent
+HMMER1- or SAM-formatted hidden Markov model (HMM).
+.I profile-file
+is a nucleic acid or protein profile in PROSITE format.
+.I random-model-file
+contains a simple null-model in the format used by the HMM search programs
+of the HMMER1 package.
 The result is written to the standard output.
-.LP
-The profile-to-HMM conversion method is described in Bucher
-.I et al.
-(1996). 
+
+The profile-to-HMM conversion method is described in Bucher et al. (1996). 
 All profile scores corresponding to transitions which are not supported
-by the HMM architectures of the
-.SM SAM
-and
-.SM HMMER1
-packages, are ignored. 
+by the HMM architectures of the SAM and HMMER1 packages, are ignored. 
 If no random model is specified on the command line, 
 the null model given in the GENERAL_SPEC data block of the profile is used. 
 If this is also missing, a flat residue distribution
 is assumed.
-.\" ------------------------------------------------
-.\" Options section
-.\" ------------------------------------------------
 .SH OPTIONS 
-.\" --- profile ---
-.TP
-.I profile
-Input
-.SM PROSITE
-generalized profile.
-The motif described by the profile will be converted into an approximately
-equivalent HMM. If the filename is replaced by a
-.RB ' \- ',
-.B ptoh
-will read the input profile from
-.BR stdin .
-.\" --- random_model ---
 .TP
-.I random_model
-Input random model file.
-.br
-This file should contain a simple null-model using the same residue alphabet as
-the
-.IR profile .
-.\" --- f ---
-.TP
-.B \-f
+\-f
 Generate free insert-modules (FIMs) at the beginning
 and at the end of the model which approximately emulate domain-global
 or semi-global alignment mode 
-.RI ( see
-Bucher
-.I et al.
-1996).
-.\" --- F ---
+.I (see
+Bucher et al. 1996).
 .TP
-.B \-F
+\-F
 Generate free insert-modules (FIMs) at the beginning
 and at the end of the model which approximately emulate 
 local alignment mode. 
-.\" --- h ---
-.TP
-.B \-h
-Display usage help text.
-.RS
-.TP
-Note:
-The meaning of this option has changed between version 2.2 and the current
-release of the
-.B pftools
-package. No option is needed to get
-.SM HMMER1
-output format because it is the default
-.RI ( see
-option
-.BR \-s ).
-.RE
-.\" --- s ---
 .TP 
-.B \-s
-Output in
-.SM SAM
-format.
-.\" --- D ---
+\-h
+Output in HMMER1 ascii format. This is the default.
+.TP 
+\-s
+Output in SAM format.
+.SH ADDITIONAL PARAMETERS 
 .TP
-.BI \-D\  del_to_del
-Delete-to-delete transition probabilities.
-.br
-They are used in conjunction with FIMs (options 
-.BR \-f ,
-.BR \-F ).
-This value will be imposed on all delete-to-delete transitions of the model.
+D=#
+Delete-to-delete transition probabilities used in conjunction with FIMs (options 
+.I -f, -F).
+This value will be imposed on
+all delete-to-delete transitions of the model.
 The other outgoing transitions from the affected delete states will be renormalized to satisfy
 the "sum to one" requirement. 
 Note that the application of the 
@@ -165,117 +63,53 @@ model may thus change again as a result of renormalizations
 following the application of the  
 .I I
 parameter.
-.br
-Default: 0.9
-.\" --- I ---
+Default: D=0.9. 
 .TP
-.BI \-I\  ins_to_ins
-Insert-to-insert transition probabilities.
-.br
-They are used in the FIMs (options 
-.BR \-f ,
-.BR \-F ).
+I=#
+Insert-to-insert transition probabilities used in the FIMs (
+.I see
+options 
+-f, -F).
 This value will be imposed on the first and the last match-to-insert and insert-to-insert 
 transition probabilities of the model. 
 The other outgoing transitions of the affected states 
 will be renormalized such as to satisfy the "summing to one" requirement.
 If the 
-.B \-F 
+.I -F 
 option is simultaneously set, the
 .I I
 parameter will also be imposed on the insert-to-delete transition probability
 at the beginning, and on the delete-to-insert transition probability at the 
 end of the model.
-.br
-Default: 0.99
-.\" --- L ---
+Default: I=0.99. 
 .TP
-.BI \-L\  log_base
-Logarithmic base.
-.br
-Specifies the logarithmic base used for conversion of the profile scores into HMM probabilities
+L=#
+Logarithmic base used for conversion of the profile scores into HMM probabilities
 (The profile scores are interpreted as log-odds ratios,
 .I see
-Bucher
-.I et al.
-1996). This value over-writes the logarithmic base 
+Bucher et al. 1996). This value over-writes the logarithmic base 
 specified within the profile by the optional 
 .I LOG_BASE
-parameter.
-.br
-Default: 1.0233739 (1/30 bit units)
-.\" ------------------------------------------------
-.\" Parameters section
-.\" ------------------------------------------------
-.SH PARAMETERS 
-.TP
-Note:
-for backwards compatibility, release 2.3 of the
-.B pftools
-package will parse the version 2.2 style parameters, but these are
-.I deprecated
-and the corresponding option (refer to the
-.I options
-section) should be used instead.
-.TP
-D=#
-Delete-to-delete transition probabilities.
-.br
-Use option
-.B \-D
-instead.
-.TP
-I=#
-Insert-to-insert transition probabilities.
-.br
-Use option
-.B \-I
-instead.
-.TP
-L=#
-Logarithmic base.
-.br
-Use option
-.B \-L
-instead.
-.\" ------------------------------------------------
-.\" Examples section
-.\" ------------------------------------------------
+parameter. 
+Default: 1.0233739 (1/30 bit units).
 .SH EXAMPLES
 .TP
 (1)
 .B ptoh
-\-Fs \-L 1.0233739 sh3.prf standard.random > sh3.hmm
-.IP
-Generates a
-.SM SAM
-formatted HMM for the SH3 domain from a profile. The file
-.RI ' sh3.prf '
-contains the source profile in
-.SM PROSITE
-format.
-The file
-.RI ' standard.random '
-contains the null-model used for conversion of the log-odds ratios into probabilities.
+-Fs sh3.prf standard.random L=1.0233739 > sh3.hmm
+
+Generates a SAM-formatted HMM for the SH3 domain
+from a profile.
+sh3.prf contains the source profile
+in PROSITE format.
+standard.random contains the null-model used for conversion
+of the log-odds ratios into probabilities.
 The logarithmic base 1.0233739 corresponds to 1/30 bits, the implicit scale
 of the profile.
 The 
-.B \-F 
-option causes the HMM to emulate local alignment (fragment search) mode.
-.\" ------------------------------------------------
-.\" Exit code section
-.\" ------------------------------------------------
-.SH EXIT CODE
-.LP
-On successful completion of its task,
-.B ptoh
-will return an exit code of 0. If an error occurs, a diagnostic message will be
-output on standard error and the exit code will be different from 0. When conflicting
-options where passed to the program but the task could nevertheless be completed, warnings
-will be issued on standard error.
-.\" ------------------------------------------------
-.\" References section
-.\" ------------------------------------------------
+.I -F 
+option causes the HMM to emulate 
+local alignment (fragment search) mode.
 .SH REFERENCES
 .LP
 Bucher P, Karplus K, Moeri N & Hofmann, K. (1996).
@@ -283,13 +117,8 @@ Bucher P, Karplus K, Moeri N & Hofmann, K. (1996).
 .I technique based on generalized
 .I profiles.
 Comput. Chem.
-.BR 20 :3-24.
-.\" ------------------------------------------------
-.\" Author section
-.\" ------------------------------------------------
+\fB20\fR:3-24.
 .SH AUTHOR
-The
-.B pftools
-package was developped by Philipp Bucher.
+Philipp Bucher
 .br
-Any comments or suggestions should be addressed to <pftools at isb-sib.ch>.
+Philipp.Bucher at isrec.unil.ch
diff --git a/man/xpsa.5 b/man/xpsa.5
deleted file mode 100644
index d809054..0000000
--- a/man/xpsa.5
+++ /dev/null
@@ -1,396 +0,0 @@
-.\"
-.\" $Id: xpsa.5,v 1.5 2003/08/11 12:09:14 vflegel Exp $
-.\" Copyright (c) 2003 Swiss Institute of Bioinformatics <pftools at isb-sib.ch>
-.\" Process this file with
-.\" groff -man -Tascii <name>
-.\" for ascii output or
-.\" groff -man -Tps <name>
-.\" for postscript output
-.\"
-.TH XPSA 5 "July 2003" "pftools 2.3" "File formats"
-.\" ------------------------------------------------
-.\" Name section
-.\" ------------------------------------------------
-.SH NAME
-xpsa \- extended psa header
-.\" ------------------------------------------------
-.\" Description section
-.\" ------------------------------------------------
-.SH DESCRIPTION
-.B xpsa
-is an extension of the
-.BR psa (5)
-file format used by the
-.B pftools
-package to describe and store biological sequences.
-.PP
-.B xpsa
-uses
-.IR keyword = value
-pairs in the header to include information about the sequence or the alignment
-between the sequence and a
-.I PROSITE
-profile (or any other kind of motif). The syntax is therefore easily extensible. In this man-page, we focus on 
-the keywords defined and used by the
-.B pftools
-package. 
-.PP
-In the following text we will use the more general term
-.RI ' motif '
-when in fact our discussion refers specifically to
-.IR "PROSITE profiles" .
-Nevertheless the keywords defined here can be used by any kind of sequence analysis tool
-to store and transfer information.
-.PP
-None of the defined keywords are mandatory and analysis tools have often a length limit imposed
-on the header line. In order to keep the header line reasonnably short and user readable,
-these tools can easily remove individual
-.IR keyword = value
-pairs which are not important to the specific task at hand.
-.\" ------------------------------------------------
-.\" Syntax section
-.\" ------------------------------------------------
-.SH SYNTAX
-The general syntax of the
-.B xpsa
-header is given below. For examples please refer to the corresponding
-.I examples
-section.
-.PP
-The biological sequence itself starts on the next line following the header and may extend over several lines.
-If several sequences are contained in the same file, each must be preceded by a header line.
-.PP
-.sp
-Syntax of the header line:
-.sp
-.RS
-.BI > seq_id / seq_pos
-{
-.RI "[ "  keyword = value " | " free_text " ]" 
-}
-.RE
-.sp
-The header must start with a
-.RB ' > '
-followed by the fields detailed below:
-.RS
-.\" --- seq_id ---
-.TP
-.I seq_id
-typically the 
-.IR accession \ number\ and\  identifier
-of the sequence.  This text field should not contain any spaces.
-.TP
-Note:
-If the input sequences have a well defined accession number and identifier (as is
-the case with
-.SM SWISS-PROT
-entries)
-.BR pfsearch "(1) and " pfscan (1)
-will use as
-.IR seq_id
-the accession number separated by a
-.RB ' | '
-from the identifier.
-.br
-If the input sequences are in
-.SM FASTA
-format, no guess can be made about the accession number or the identifier. Therefore
-.BR pfsearch "(1) and " pfscan (1)
-will use as
-.IR seq_id
-all text following the
-.RB ' > '
-character up to the first whitespace.
-.\" --- seq_pos ---
-.TP
-.I seq_pos
-this field describes the sequence coordinates where a
-motif matches. The positions are generally given as
-.IR start_pos \- end_pos
-pairs.
-.br
-If present, this field is separated from the
-.I seq_id
-by a
-.RB ' / '
-character.
-.\" --- keyword=value ---
-.TP
-.IR keyword = value
-is an optional list of defined 
-.IR keyword = value
-pairs. Each pair should be separated from the next or from free text by whitespaces.
-.br
-The
-.I keyword
-is case sensitive in the current implementation of the
-.B pftools
-package. It should not exceed 24 characters in length.
-.br
-The
-.I value
-can be numeric or alphanumeric. Values containing whitespaces should be enclosed in either
-.I single quotes
-or
-.IR "double quotes" .
-If the same type of quote appears inside the value it must be escaped using the
-.RB ' \(rs '
-character.
-.RS
-.TP
-Note:
-the
-.B pftools
-do not currently produce quote enclosed values.
-.RE
-.\" --- free_text ---
-.TP
-.I free_text
-typically this is a description of the sequence. It should not contain any of the defined
-.IR keyword = value
-pairs.
-.PP
-.\" ------------------------------------------------
-.\" Keywords subsection
-.\" ------------------------------------------------
-.SS Keywords
-.RE
-Keywords used by the
-.BR pfsearch "(1) and " pfscan (1)
-programs:
-.RS
-.\" --- level ---
-.TP
-.I level
-the highest cut-off level (as a value) exceeded by the alignment.
-.br
-The characters
-.RB ' NA '
-indicate that the alignment score does not exceed any of the cut-off levels defined in the motif.
-.\" --- level_tag ---
-.TP
-.I level_tag
-the highest cut-off level (as a character string) exceeded by the alignment.
-.br
-The characters
-.RB ' NA '
-indicate that the alignment score does not exceed any of the cut-off levels defined in the motif.
-.RS
-.TP
-Note:
-.BR pfsearch "(1) and " pfscan (1)
-only report the first 2 characters of the level text string.
-.RE
-.\" --- match_nb ---
-.TP
-.I match_nb
-if the motif matches several times on the same sequence, each alignment is numbered incrementally.
-.br
-If the motif is circular, each single repeat is numbered incrementally with the key 
-.I repeat_nb
-(see below).
-.\" --- match_parent ---
-.TP
-.I match_parent
-for each single match of a circular motif, this key references the number of the parental total match of the circular
-motif.
-.RS
-.TP
-Note:
-if a circular motif matches only once on a given sequence,
-.BR pfsearch "(1) and " pfscan (1)
-do not report this key.
-.RE
-.\" --- match_type ---
-.TP
-.I match_type
-identifies the type of match. Either
-.B region
-for a complete match of a motif to a sequence, or
-.B repeat
-for a single repeat of a circular motif.
-.\" --- motif ---
-.TP
-.I motif
-the name and/or identifier of the motif.
-.\" --- motif_start ---
-.TP
-.I motif_start
-the motif position where the alignment begins.
-.\" --- motif_end ---
-.TP
-.I motif_end
-negative offset from the end of the alignment to the end of the motif.
-.\" --- norm_score ---
-.TP
-.I norm_score
-the normalized score of the alignment.
-.\" --- raw_score ---
-.TP
-.I raw_score
-the raw score of the alignment.
-.\" --- repeat_nb ---
-.TP
-.I repeat_nb
-if the motif is circular, each individual repeat is numbered incrementally with this keyword.
-.\" --- seq_end ---
-.TP
-.I seq_end
-negative offset from the end of the alignment to the end of the sequence.
-.br
-In combination with the information given by 
-.I seq_pos
-this allows to deduce the length of the query sequence.
-.\" --- strand ---
-.TP
-.I strand
-the sequence strand on which the motif matches, when the search includes the reverse complement of a DNA sequence.
-The
-.I value
-is either
-.B s
-for the sens or
-.B r
-for the reverse strand.
-.PP
-.RE
-Keywords used by the
-.BR pfmake "(1) and " pfw (1)
-programs:
-.RS
-.\" --- weight ---
-.TP
-.I weight
-the weight of a given sequence in a multiple alignment.
-.\" ------------------------------------------------
-.\" Examples section
-.\" ------------------------------------------------
-.SH EXAMPLES
-.TP
-(1)
->O00628|PEX7/73-315
-.IR motif =PS50294|WD_REP
-.IR raw_score =1336
-.IR match_nb =1
-.IR match_type =region
-.IR seq_end =-491 
-.br
-VTW[...]IYD
-.br
->O00628|PEX7/540-801
-.IR motif =PS50294|WD_REP
-.IR raw_score =1378
-.IR match_nb =2
-.IR match_type =region
-.IR seq_end =-5 
-.br
-SFD[...]PAS
-.br
-
-The 2 headers above describe 2 matches of the motif called
-.RI ' WD_REP '
-onto the sequence
-.RI ' PEX7 '.
-Each of the matches onto this single sequence is numbered using the the
-.I match_nb
-keyword.
-These matches are not individual repeats of a circular motif as can be seen with the
-.I region
-value of the
-.I match_type
-keyword.
-.br
-The first match starts at position 73 of the sequence and ends at position 315. This position is 491
-residues away from the end of the input sequence
-.RI ( seq_end ).
-.br
-The next line following the
-.BR xpsa (5)
-header line is the sequence of the match (it has been truncated here to help readability).
-.br
-The second match begins at position 540 of the sequence and terminates 5 residues before the end of the
-input sequence, that is at position 801.  
-.RE
-
-.TP
-(2)
->O00628|PEX7/540-582
-.IR motif =PS50294|WD_REP
-.IR norm_score =7.437
-.IR raw_score =180
-.IR match_parent =2
-.IR repeat_nb =1
-.IR match_type =repeat
-.IR level =-1
-.IR seq_end =-224
-.IR motif_start =1
-.IR motif_end =-1 
-.br
-SFD[...]PLQ
-.br
-
-This example illustrates the kind of header obtained when aligning a circular motif
-to a sequence. Each match of this motif (which we will call
-.I total
-match) can be composed of several individual repeats of the motif. Tools like
-.BR pfsearch "(1) and " pfscan (1)
-can output each total match followed by all its individual repeats. In this example
-we only show one of the indiviual repeats that is part of a total match between a circular profile
-and a sequence.
-.br
-The
-.BR xpsa (5)
-header above describes a single repeat of a match between a circular motif called 
-.RI ' WD_REP '
-and the sequence
-.RI ' PEX7 '.
-.br
-This is the first individual repeat of a match of the circular motif, as identified by the
-.I repeat_nb
-keyword. The other individual repeats have not been listed in this example.
-.br
-The total circular motif has at least 2 distinct matches on the
-.RI ' PEX7 '
-sequence, because this single repeat is part of the second match as described by the
-.I match_parent
-keyword. The parental matches have been ommited from this example, they would be numbered using the
-.I match_nb
-keyword.
-.br
-The normalized score of this motif exceeds the cut-off level number -1 
-.RI ( level
-keyword) which is specified in the motif.
-.br
-This match starts at position 1 of the profile
-.RI ( motif_start )
-and position 540 of the sequence, it ends at the end of the motif
-.RI ( motif_end =-1)
-and position 582 of the sequence.
-.br
-The next line following the
-.BR xpsa (5)
-header line is the sequence of the match (it has been truncated here to help readability).
-.RE
-.\" ------------------------------------------------
-.\" See also section
-.\" ------------------------------------------------
-.SH "SEE ALSO"
-.BR psa (5),
-.BR pfsearch (1),
-.BR pfscan (1),
-.BR pfw (1),
-.BR pfmake (1),
-.BR psa2msa (1)
-.\" ------------------------------------------------
-.\" Author section
-.\" ------------------------------------------------
-.SH "AUTHOR"
-This manual page was originally written by Volker Flegel.
-.br
-The
-.B pftools
-package was developped by Philipp Bucher.
-.br
-Any comments or suggestions should be addressed to <pftools at isb-sib.ch>.
-
diff --git a/missing b/missing
new file mode 100755
index 0000000..28055d2
--- /dev/null
+++ b/missing
@@ -0,0 +1,376 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+
+scriptversion=2009-04-28.21; # UTC
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
+# 2008, 2009 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, see <http://www.gnu.org/licenses/>.
+
+# 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]
+
+Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
+\`g' are ignored when checking the name.
+
+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
+
+# normalize program name to check for.
+program=`echo "$1" | sed '
+  s/^gnu-//; t
+  s/^gnu//; t
+  s/^g//; t'`
+
+# 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).  This is about non-GNU programs, so use $1 not
+# $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 $program 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 $?
+    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-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/pfscan.1 b/pfscan.1
deleted file mode 100644
index 427773d..0000000
--- a/pfscan.1
+++ /dev/null
@@ -1,416 +0,0 @@
-.\"
-.\" $Id: pfscan.1,v 1.5 2003/08/11 12:09:14 vflegel Exp $
-.\" Copyright (c) 2003 Swiss Institute of Bioinformatics <pftools at isb-sib.ch>
-.\" Process this file with
-.\" groff -man -Tascii <name>
-.\" for ascii output or
-.\" groff -man -Tps <name>
-.\" for postscript output
-.\"
-.TH PFSCAN  1 "July 2003" "pftools 2.3" "pftools"
-.\" ------------------------------------------------
-.\" Name section
-.\" ------------------------------------------------
-.SH NAME
-pfscan \- scan a protein or DNA sequence with a profile library 
-.\" ------------------------------------------------
-.\" Synopsis section
-.\" ------------------------------------------------
-.SH SYNOPSIS
-.TP 10
-.B pfscan
-[
-.B \-abdfhlLmruksvxyz
-] [
-.B \-C
-.I cut_off
-] [
-.B \-M
-.I mode_nb
-] [
-.B \-W
-.I width
-] [
-.I sequence
-|
-.B \-
-] [
-.I profile_library
-|
-.B \-
-] [
-.I parameters
-]
-.\" ------------------------------------------------
-.\" Description section
-.\" ------------------------------------------------
-.SH DESCRIPTION
-.B pfscan 
-compares a protein or nucleic acid sequence against a profile library. 
-The result is an unsorted list of profile-sequence matches written to
-the standard output.
-A variety of output formats containing different informations can be specified
-via the options
-.BR \-l , \ \-L , \ \-r , \ \-k , \ \-s , \ \-x , \ \-y
-and 
-.BR \-z .
-The file
-.RI ' sequence '
-contains a sequence in
-.SM EMBL/SWISS-PROT
-format (assumed by default) or in Pearson/Fasta
-format (indicated by option 
-.BR \-f ).
-The
-.RI ' profile_library '
-file contains a library of profiles in
-.SM PROSITE
-format. 
-If
-.RB ' \- '
-is specified instead of one of the filenames, the corresponding data is read
-from the standard input.
-.\" ------------------------------------------------
-.\" Options section
-.\" ------------------------------------------------
-.SH OPTIONS 
-.\" --- sequence ---
-.TP
-.I sequence
-Input query sequence.
-.br
-This DNA or protein sequence will be used to search for matches to
-a library of
-.SM PROSITE
-profiles.
-.br
-The content of the file must be either in
-.SM EMBL/SWISS-PROT
-(default) or in Pearson/Fasta format (option
-.BR \-f ).
-If the filename is replaced by a
-.RB ' \- ',
-.B pfscan
-will read the input sequence from
-.BR stdin .
-.\" --- profile_library ---
-.TP
-.I profile_library
-Library of
-.SM PROSITE
-profiles.
-.br
-This file should contain one or several
-.SM PROSITE
-profiles, against which the query sequence will be matched.
-Each entry in this library should be separated from the next by
-a line containing only the
-.RB ' // '
-code.
-If the filename is replaced by a
-.RB ' \- ',
-.B pfscan
-will read the profile library from
-.BR stdin .
-.\" --- a ---
-.TP
-.B \-a
-Report optimal alignment scores for 
-all profiles regardless of the cut-off value. 
-This option simultaneously forces 
-.IR DISJOINT = UNIQUE .   
-.\" --- b ---
-.TP
-.B \-b
-Search the complementary strand of the DNA sequence as well.
-.\" --- f ---
-.TP
-.B \-f
-Input sequence is in Pearson/Fasta format.
-.\" --- h ---
-.TP
-.B \-h
-Display usage help text.
-.\" --- l ---
-.TP
-.B \-l
-Indicate the value of the highest cut-off level exceeded by the match score
-in the output list. 
-.\" --- L ---
-.TP
-.B \-L
-Indicate by character string the highest cut-off level exceeded by the match score
-in the output list.
-.br
-.RS
-.TP
-Note:
-The generalized profile format includes a text
-string field to specify a name for a cut-off level. The
-.B \-L
-option causes the program to display the first two characters of this text string
-(usually something like
-.RI ' ! ',\ ' ? ',\ ' ?? ',
-etc.) at the beginning of each match description.
-.RE
-.\" --- m ---
-.TP
-.B \-m
-Report individual matches for circular profiles.
-.br
-If the profile is circular, each match between a sequence and a profile can be composed
-of a stretch of individual matches of the profile. By default,
-.B pfscan
-reports only the total matched region. When this option is set, detailed information for 
-each individual match will be output as well.
-.RS
-.TP
-Note:
-The scoring system for most circular profiles has been optimized to find
-total matches, therefore the normalized scores of individual matches of a circular profile
-to a sequence should be considered with caution.
-.RE
-.\" --- r ---
-.TP
-.B \-r
-Use raw scores rather than normalized 
-scores for match selection.  The normalized score is not printed.
-.\" --- u ---
-.TP
-.B \-u
-Forces
-.IR DISJOINT = UNIQUE . 
-.\" --- C ---
-.TP
-.BI \-C\  cut_off
-Cut-off level to be used for match selection.
-.br
-The value of
-.RI ' cut_off '
-should be the numerical identifier of a cut-off level defined in the profile.
-The raw or normalized score of this level will then be used to include profile to
-sequence matches in the output list.
-.br
-If the specified level does not exist in the profile, the next higher (if 
-.I cut_off
-is negative) or next lower (if
-.I cut_off
-is positive) level defined is used instead.
-.br
-Type: integer
-.br
-Default: 0
-.\" --- M ---
-.TP
-.BI \-M\  mode_nb
-Normalization mode to use for score computation.
-.br
-The
-.RI ' mode_nb '
-specifies which normalization mode defined in the profile should be used
-to compute the normalized scores for profile to sequence matches. This
-option will override the profile's
-.I PRIORITY
-parameter.
-.br
-If the specified normalization mode does not exist in the profile, an error
-message will be output to standard error and the search is interrupted.
-.br
-Type: integer
-.br
-Default: lowest priority mode defined in the profile
-.\" ------------------------------------------------
-.\" Output modifiers subsection
-.\" ------------------------------------------------
-.SS Ouput modifiers
-.\" --- d ---
-.TP
-.B \-d
-Limit profile description length.
-.br
-If this option is set, the description of the profile on the header line
-will be limited in length. If the match information is longer than
-the output width specified using option
-.BR \-W ,
-the profile description will not be printed. Else the description will be truncated
-to fit the
-.B \-W
-value.
-.br
-By default, the profile description is not truncated. This option can not be used
-when option
-.B \-k
-is set.
-.\" --- k ---
-.TP
-.B \-k
-Use
-.BR xpsa (5)
-headers for output.
-.br
-When this option is set, all output types 
-.RI ( see
-below) will use
-an
-.BR xpsa (5)
-style header line. This format uses
-.IR keyword = value
-pairs to output alignment parameters. It is useful to transfer information between
-different sequence alignment tools.
-.\" --- s ---
-.TP
-.B \-s
-List the sequences of the matched regions as well. 
-The output will be a Pearson/Fasta-formatted sequence
-library.
-.\" --- v ---
-.TP
-.B \-v
-Suppress sequence/profile parsing warnings.
-If this option is set no warning messages will be printed on
-.IR stderr .
-Only fatal errors will be reported. This option should be used
-with caution.
-.\" --- x ---
-.TP
-.B \-x
-List profile-sequence alignments 
-in
-.BR psa (5)
-format. Please refer to the corresponding man page for more information. 
-.\" --- y ---
-.TP
-.B \-y
-Display alignments between the profile and the matched sequence regions in 
-a human-friendly pairwise alignment format.   
-.\" --- z ---
-.TP
-.B \-z
-Indicate starting and ending position of the matched profile range. The latter
-position will be given as a negative offset from the end of the profile. Thus
-the range [    1,    -1] means entire profile.
-.\" --- W ---
-.TP
-.BI \-W\  width
-Set alignment output width.
-.br
-The value of
-.RI ' width '
-specifies how many residues will be output on one line when any of the
-.BR \-s ,\  \-x \ or\  \-y
-options is set.
-.br
-Type: integer
-.br
-Default: 60
-.\" ------------------------------------------------
-.\" Parameters section
-.\" ------------------------------------------------
-.SH PARAMETERS
-.TP
-Note:
-for backwards compatibility, release 2.3 of the
-.B pftools
-package will parse the version 2.2 style parameters, but these are
-.I deprecated
-and the corresponding option (refer to the
-.I options
-section) should be used instead.
-.TP
-L=#
-Cut-off level.
-.br
-Use option
-.B \-C
-instead, not
-.BR \-L .
-.TP
-W=#
-Output width.
-.br
-Use option
-.B \-W
-instead.
-.\" ------------------------------------------------
-.\" Examples section
-.\" ------------------------------------------------
-.SH EXAMPLES
-.TP
-(1)
-.B pfscan
-\-s GTPA_HUMAN prosite13.prf
-.IP
-Scans the human GAP protein for matches to profiles in
-.SM PROSITE 
-release 13. 
-The file
-.RI ' GTPA_HUMAN ' 
-contains the 
-.SM SWISS-PROT
-entry P20936|GTPA_HUMAN.
-The profile library file
-.RI ' prosite13.prf ' 
-contains all profile entries of
-.SM PROSITE
-release 13.  
-The output is a Pearson/Fasta-formatted sequence library containing 
-all sequence regions of the input sequence matching a profile in the 
-profile library. 
-.TP
-(2)
-.B pfscan
-\-by \-C 2 CVPBR322 ecp.prf
-.IP
-Scans both strands of plasmid PBR322 for high-scoring (level 2) 
-.I E. coli
-promoter matches.   
-The sequence file
-.RI ' CVPBR322 '
-contains
-.SM EMBL
-entry J01749|CVPBR322.
-The profile library file
-.RI ' ecp.prf '
-contains a profile for
-.I E. coli  
-promoters.
-The output includes profile-sequence alignments in a human-friendly
-format. 
-.\" ------------------------------------------------
-.\" Exit code section
-.\" ------------------------------------------------
-.SH EXIT CODE
-.LP
-On successful completion of its task,
-.B pfscan
-will return an exit code of 0. If an error occurs, a diagnostic message will be
-output on standard error and the exit code will be different from 0. When conflicting
-options where passed to the program but the task could nevertheless be completed, warnings
-will be issued on standard error.
-.\" ------------------------------------------------
-.\" Bugs section
-.\" ------------------------------------------------
-.SH "BUGS"
-If the match selection is based on normalized scores 
-.RI ( i.e.
-option
-.B \-r
-is not set), rounding errors can lead to the exclusion of some matches even if
-the raw score is above or equal to the specified cut-off level score.
-.\" ------------------------------------------------
-.\" See also section
-.\" ------------------------------------------------
-.SH "SEE ALSO"
-.BR pfsearch (1),
-.BR pfmake (1),
-.BR psa (5),
-.BR xpsa (5)
-.\" ------------------------------------------------
-.\" Author section
-.\" ------------------------------------------------
-.SH AUTHOR
-The
-.B pftools
-package was developped by Philipp Bucher.
-.br
-Any comments or suggestions should be addressed to <pftools at isb-sib.ch>.
diff --git a/pfsearch.f b/pfsearch.f
deleted file mode 100644
index 5cfb0a3..0000000
--- a/pfsearch.f
+++ /dev/null
@@ -1,923 +0,0 @@
-*       Program pfsearch
-*----------------------------------------------------------------------*     
-* $Id: pfsearch.f,v 2.30 2003/12/09 13:42:42 vflegel Exp $
-*----------------------------------------------------------------------*     
-*       Function: Scan a protein or DNA sequence library for profile 
-*                 matches 
-*       Author:   Philipp Bucher
-*       Contact:  pftools at isb-sib.ch
-*       Version:  File under developpment for release 2.3
-*----------------------------------------------------------------------*     
-* DATA
-*----------------------------------------------------------------------*     
-
-* array dimensions and I/O units
-      
-      Include          'ardim.f' 
-      
-      Parameter        (NOUT=   6)    
-      
-      Parameter        (NPRF=  11)    
-      Parameter        (NSEQ=  12)    
-      
-* profile 
-
-      Character*512     FPRF
-      
-      Include          'psdat.f'
-      Include          'gsdat.f'
-      Include          'djdat.f'
-      Include          'nodat.f'
-      Include          'codat.f'
-      Include          'pfdat.f'
-      Include          'dfdat.f'
-      Include          'pxdat.f'
-      Include          'avdat.f'
-      Include          'sterr.f'
-
-      Logical           LUNI
-      Logical           LNOR
-      Logical           LREV
-      Logical           LTRA
-      Logical           LPFA
-      Logical           LEOF
-      Logical           LOUT
-      
-* sequence
-      
-      Character*512     FSEQ
-      
-      Character*64      CSID
-      Character*64      CSAC
-      Character*64      CSFH
-      Character*512     CSDE
-      
-      Integer           LSEQ
-      Integer           BSEQ
-
-      Integer*2         ISEQ(IDMS)
-      
-      Logical           LCKS(IDMS)
-      
-      Integer*2         IS
-
-* number of sequences read
-
-      Integer           INBS
-      Integer           INBP
-
-
-* function return types
-
-      Integer           Xblnk
-      External          Xblnk
-
-* options and command line parameters
-
-      Logical           OPTA
-      Logical           OPTB 
-      Logical           OPTF 
-      Logical           OPTL 
-      Logical           OPLU 
-      Logical           OPTR 
-      Logical           OPTS 
-      Logical           OPTU 
-      Logical           OPTX 
-      Logical           OPTY 
-      Logical           OPTZ 
-      Logical           OPTM
-      Logical           OPTK
-      Logical           OPTJ
-      Logical           OPTO
-      Logical           OPTD
-      Logical           OPTV
-
-      Logical           LCMM
-      
-      Integer           NCUC
-      Integer           KCUC
-      real              XCUC
-      Logical           LDRS   
-* alignments
-
-      Integer           NALI
-      Integer           IALS(IDMN)
-      Integer           IALB(IDMN)
-      Integer           IAL1(IDMN)
-      Integer           IAL2(IDMN)
-      Integer           IALE(IDMN)
-      
-      Integer           LALI
-      Character         CALI(IDMA) 
-      Character         CPMA(IDMM)
-      
-* multiple matches of circular profile
-
-      Integer           NMAT(IDMN)
-C      Integer           IMMB(IDMN,IDML)
-C      Integer           IMME(IDMN,IDML)
-      Integer           PK1E(IDML)
-      Integer           PK1B(IDML)
-      Integer           PK2E(IDML)
-      Integer           PK2B(IDML)
-      Integer           PK3E(IDML)
-      Integer           PK3B(IDML)
-      Integer           PJSE(IDML)
-      Integer           PJ1E(IDML)
-      Integer           PJ1B(IDML)
-      Integer           PLAL(IDML)
-      Integer           IMSC(IDML)
-
-* path matrix fields
-      
-      Integer           IOPM(0:IDMP)
-      Integer           IOPI(0:IDMP)
-      Integer           IOPD(0:IDMP)
-      
-      Integer           IOMB(0:IDMP)
-      Integer           IOM1(0:IDMP)
-      Integer           IOM2(0:IDMP)
-      
-      Integer           IOIB(0:IDMP)
-      Integer           IOI1(0:IDMP)
-      Integer           IOI2(0:IDMP)
-      
-      Integer           IODB(0:IDMP)
-      Integer           IOD1(0:IDMP)
-      Integer           IOD2(0:IDMP)
-
-* work fields
-
-C     Character*1024    RCIN
-C     Character*1024    RCOUT
-
-* initialization of controlled vocabularies
-
-      Include          'cvini.f' 
-
-*----------------------------------------------------------------------*     
-* INPUT SECTION 
-*----------------------------------------------------------------------*     
-
-      IRC=0
-      
-      LUNI=.FALSE.
-      LNOR=.FALSE.
-      LREV=.FALSE.
-      LTRA=.FALSE.
-      LPFA=.FALSE.
-      LDRS=.FALSE.
-      
-      LEOF=.FALSE.
-      CABC(0)='-'
-
-      INBS=0
-      INBP=0
-
-* read command line arguments
-
-      Call Repar(
-     *   OPTA,OPTB,OPTF,OPTL,OPLU,OPTR,OPTS,OPTU,OPTX,OPTY,OPTZ,OPTM,
-     *   OPTK,OPTJ,FPRF,FSEQ,NCUC,KCUC,XCUC,NW,NMOD,OPTO,OPTD,OPTV,IRC)
-      If(IRC.NE.0) then 
-         Write(NERR,'(/,
-     *      ''pfsearch 2.3 revision 5.d'',//
-     *      ''Usage: pfsearch [ -abCdfhlLmMkrsuvWxyz ] [ profile-file'',
-     *      '' | - ] [ seq-library-file | - ] [ parameters ]'',//
-     *      )')
-         Write(NERR,'(
-     *      ''   options:'',/,
-     *      ''    -a: report optimal alignment for all sequences.'',/
-     *      ''    -b: search complementary strand of DNA sequences.'',/
-     *      ''    -f: input sequence file is in FASTA format.'',/
-     *      ''    -h: print usage help text.'',/
-     *      ''    -l: indicate highest cut-off level (number).'',/
-     *      ''    -L: indicate highest cut-off level (text).'',/
-     *      ''    -m: report individual matches for circular'',
-     *      '' profiles.'',/
-     *      ''    -r: use raw score.'',/
-     *      ''    -u: force profile disjointness to UNIQUE.''
-     *      )')
-         Write(NERR,'(
-     *      ''    -C<value>:'',/
-     *      ''        cut-off value. An integer value forces -r.'',
-     *      '' Same as parameter C.'',/
-     *      ''    -M<value>:'',/
-     *      ''        set the normalization mode to use for the'',
-     *      '' score computation.'',/
-     *      ''        Overrides the profile PRIORITY parameter.'',/
-     *      )')
-         Write(NERR,'(
-     *      ''   output modifiers:'',/,
-     *      ''    -d: impose length limit on sequence description.'',/
-     *      ''    -k: output using the xPSA header (using keyword'',
-     *      ''=value pairs).'',/
-     *      ''    -j: output using the xPSA header adding the sequence'',
-     *      '' matched by itself.'',/
-     *      ''    -s: list sequences of the matched regions.'',/
-     *      ''    -v: suppress warnings on stderr.'',/
-     *      ''    -x: list alignments in PSA format.'',/
-     *      ''    -y: list alignments in human readable form.'',/
-     *      ''    -z: indicate profile start and stop positions.'',/
-     *      ''    -W<value>:'',/
-     *      ''        specifies the output width. Same as parameter'',
-     *      '' W.'',/
-     *      )')
-         Write(NERR,'(
-     *      ''   valid (but deprecated) parameters are:'',/,
-     *      ''    [C=cut-off-value]  use option -C instead'',/
-     *      ''    [W=output-width]   use option -W instead'',/
-     *      )')
-         Call Exit(IRC)
-      End if
-      
-      If(FSEQ.EQ.'-') then 
-         MSEQ=5
-      Else
-         MSEQ=NSEQ
-      End if
-      
-      If(FPRF.EQ.'-') then 
-         MPRF=5
-      Else
-         MPRF=NPRF
-      End if
-
-      If(OPTR) then
-         LDRS=.TRUE.
-      End if
-    
-      If(OPTJ) then
-          OPTK=.TRUE.
-      End if
-
-* read profile
-
-      Call REPRF
-     *   (MPRF,FPRF,
-     *   CPID,CPAC,CPDT,CPDE,LHDR,CHDR,LFTR,CFTR,NABC,CABC,LPRF,LPCI,
-     *   BLOG,FABC,P0,
-     *   CDIS,JDIP,MDIS,NDIP,
-     *   CNOR,JNOP,JNOR,MNOR,NNOR,NNPR,CNTX,RNOP, 
-     *   JCUT,MCLE,CCUT,ICUT,JCNM,RCUT,MCUT, 
-     *   IDMP,CHIP,IIPP,CHMP,IMPP,CHIL,IIPL,ILIP,
-     *   CHID,IIPD,CHMD,IMPD,
-     *   INBP,LEOF,OPTV,IRC)
-      
-      If(IRC.GT.0) go to 100
-
-* check parameter consistency
-      
-      If(.NOT.OPTV.AND.OPTM.AND..NOT.LPCI) then
-         Write(NERR,*) 'Warning: Profile not circular. ',
-     *      'Ignoring option -m.'
-         OPTM=.FALSE.
-      End if
-      If(.NOT.OPTV.AND.OPTB.AND.NABC.GT.4) then
-         Write(NERR,*) 'Warning: Not a DNA profile. ',
-     *      'Ignoring option -b.'
-         OPTB=.FALSE.
-      End if
-      If(.NOT.OPTV.AND.OPTA.AND.NCUC.GT.0) then
-         Write(NERR,*) 'Warning: Option -a is set. Ignoring command',
-     *      ' line cut-off (option -C).'
-         NCUC=0
-      End if
-      If(.NOT.OPTV.AND.OPTR.AND.NCUC.GT.1) then
-         Write(NERR,*) 'Warning: Option -r is set. Please use only',
-     *      ' integer command line cut-off (option -C) values.'
-         NCUC=0
-      End if
-      
-* get cut-off for mode nb specified on command line
-
-      KCUT=0
-      If(OPTO) then
-         J1=0
-*   find the specified normalisation mode
-         Do 1 I1=1,JNOR
-            If(NNOR(I1).EQ.NMOD) J1=I1
- 1       Continue
-*   exit if mode number not specified in profile
-         If(J1.EQ.0) Go to 901
-         
-*   if cut-off value was specified on command line do not search levels
-         If(NCUC.EQ.2) then
-            LNOR=.TRUE.
-            INOR=J1
-            MNUM=NNOR(J1)
-            IFUN=MNOR(J1)
-*   exit if an integer cut-off value was specified with option M
-         Else if(NCUC.EQ.1) then
-            Go to 902
-*   find mode number in list of level 0 cut-off values
-         Else
-            INOR=0
-            Do 3 I1=1,JCUT
-               If(MCLE(I1).EQ.0) then
-                  If(JCNM(I1).NE.0) then 
-                     J2=0
-                     Do 2 I2=1,JCNM(I1)
-                        If(MCUT(I2,I1).EQ.NMOD) J2=I2
- 2                   Continue
-                     If(J2.EQ.0) Go to 903
-                     LNOR=.TRUE.
-                     INOR=J1
-                     MNUM=NNOR(J1)
-                     IFUN=MNOR(J1)
-                     KCUT=ICUT(I1)
-                     XCUT=RCUT(J2,I1)
-                  Else
-                     Go to 903
-                  End if
-               End if
- 3          Continue
-            If(INOR.EQ.0) Go to 901
-         End if
-      Else
-         
-* get cut-off and normalisation modes from profile
-         
-         Do   6 I1=1,JCUT
-            If(MCLE(I1).EQ.0) then
-               INOR=0
-               If(JCNM(I1).NE.0) then 
-                  LNOR=.TRUE.
-*               J2=1
-                  Do  5 I2=1,JCNM(I1)
-                     J3=0
-                     Do  4 I3=1,JNOR
-                        If(MCUT(I2,I1).EQ.NNOR(I3)) J3=I3
- 4                   Continue
-                     If(J3.EQ.0) Go to 904
-                     
-                     If     (I2.EQ.1) then 
-                        INOR=J3
-                        MNUM=NNOR(J3)
-                        NPRI=NNPR(J3)    
-                        IFUN=MNOR(J3)
-                        KCUT=ICUT(I1)
-                        XCUT=RCUT(I2,I1)
-                     Else if(NNPR(J3).LT.NPRI) then
-                        INOR=J3
-                        MNUM=NNOR(J3)
-                        NPRI=NNPR(J3)    
-                        IFUN=MNOR(J3)
-                        KCUT=ICUT(I1)
-                        XCUT=RCUT(I2,I1)
-                     End if
- 5                Continue
-               End if 
-               
-               If(JCNM(I1).EQ.0.OR.INOR.EQ.0) then
-                  KCUT=ICUT(I1)
-                  LNOR=.FALSE.
-               End if
-            End if
- 6       Continue
-      End if
-      
-* cut-off from command line 
-      
-      If(NCUC.EQ.1) then 
-         KCUT=KCUC
-         OPTR=.TRUE.
-      Else if(NCUC.EQ.2.AND.LNOR) then
-         XCUT=XCUC
-      Else if(.NOT.OPTV.AND.NCUC.EQ.2.AND..NOT.LNOR) then
-         Write(NERR,*) 'Warning: Profile does not provide ',
-     *      'normalization. Ignoring command line cut-off.'
-      End if
-      If(.NOT.LNOR) OPTR=.TRUE.
-
-* disjointness definition
-* set disjointness position to begin and end of profile if necessary
-
-      If(MDIS.EQ.1.OR.OPTU.OR.OPTA) then
-         LUNI=.TRUE.
-         If(MDIS.EQ.1) then
-            NDIP(1)=1
-            NDIP(2)=LPRF
-         End if
-      Else
-         LUNI=.FALSE.
-      End if
-
-* - initialize profile lock
-      
-      If(.NOT.LPCI) then
-         Do  8 I1=0,NDIP(1)-1 
-            IIPP(E0,I1)=NLOW
-            IIPP(E1,I1)=NLOW
- 8       Continue
-         
-         Do  9 I1=NDIP(2),LPRF 
-            IIPP(B0,I1)=NLOW
-            IIPP(B1,I1)=NLOW
- 9       Continue
-      End if
-      
-C      End if
-
-* profile extra parameters
-      
-      MLOW=NLOW/4*3
-      Do  10 I1=0,LPRF
-         IIPX( XM,I1) = MAX(MLOW,IIPP( B1,I1) + IIPP( BM,I1)) 
-         IIPX( XI,I1) = MAX(MLOW,IIPP( B1,I1) + IIPP( BI,I1)) 
-         IIPX( XD,I1) = MAX(MLOW,IIPP( B1,I1) + IIPP( BD,I1)) 
-         IIPX( YM,I1) = MAX(MLOW,IIPP( B0,I1) + IIPP( BM,I1)) 
-         IIPX( YI,I1) = MAX(MLOW,IIPP( B0,I1) + IIPP( BI,I1)) 
-         IIPX( YD,I1) = MAX(MLOW,IIPP( B0,I1) + IIPP( BD,I1)) 
-         IIPX( MX,I1) = MAX(MLOW,IIPP( E1,I1) + IIPP( ME,I1)) 
-         IIPX( IX,I1) = MAX(MLOW,IIPP( E1,I1) + IIPP( IE,I1)) 
-         IIPX( DX,I1) = MAX(MLOW,IIPP( E1,I1) + IIPP( DE,I1)) 
-         IIPX( MY,I1) = MAX(MLOW,IIPP( E0,I1) + IIPP( ME,I1)) 
-         IIPX( IY,I1) = MAX(MLOW,IIPP( E0,I1) + IIPP( IE,I1)) 
-         IIPX( DY,I1) = MAX(MLOW,IIPP( E0,I1) + IIPP( DE,I1)) 
- 10   Continue
-      
-* average match score for average amino acid composition 
-      
-      If(.NOT.OPTR.AND.IFUN.EQ.3) 
-     *   Call CPAve(IMPP,IDMP,LPRF,CABC,NABC,PAVE)
-
-* alignment and ouptut format switches 
-
-      If(OPTX.OR.OPTY.OR.OPTZ.OR.OPTM) then 
-         LTRA=.TRUE.
-      Else
-         LTRA=.FALSE.
-      End if
-      If(OPTS.OR.OPTX) then
-         LPFA=.TRUE.
-      Else
-         LPFA=.FALSE.
-      End if
-
-* compute alignments if any output format switch is specified
-
-      LOUT=(LTRA.OR.LPFA)
-      
-*----------------------------------------------------------------------*
-* major loop over sequences
-*----------------------------------------------------------------------*
-
-* read sequence  
-
- 20   Continue
-      If(LEOF) go to 100
-      If(OPTF) then 
-         Call RFSEQ
-     *      (MSEQ,FSEQ,NABC,CABC,CSID,CSAC,CSDE,CSFH,LSEQ,ISEQ,LEOF,
-     *      INBS,OPTV,IRC)
-      Else 
-         Call RESEQ
-     *      (MSEQ,FSEQ,NABC,CABC,CSID,CSAC,CSDE,LSEQ,ISEQ,LEOF,
-     *      INBS,OPTV,IRC)
-      End if 
-      If(IRC.GT.0) go to 100
-      If(LEOF.AND.IRC.LT.0) then
-         If(INBS.GE.1) IRC=0
-         go to 100
-      End if
-      
-      JSEQ=0
-
- 25   Continue
-
-* should alignments of repeats be computed
-
-      If(OPTM) then
-         LCMM=.TRUE.
-      Else
-         LCMM=.FALSE.
-      End if
-
-      BSEQ=1
-
-* compute cut-off in raw score units
-      
-      If(.NOT.OPTR) then
-         If(IFUN.EQ.3) then
-            Call CFAve(ISEQ,IDMS,BSEQ,LSEQ,CABC,NABC,FAVE)
-            RAVE=0
-            Do  I1=0,NABC
-               RAVE=RAVE+FAVE(I1)*PAVE(I1)
-            End do
-         End if
-         Call NtoR(XCUT,KCUT,RNOP,KNPM,MAXN,INOR,IFUN,LSEQ,RAVE)
-      End if
-
-* compute optimal alignment score
-
-      Call XALI1
-     *   (LPRF,LPCI,
-     *   KCUT,IIPP,IMPP,IIPX,
-     *   BSEQ,LSEQ,ISEQ,
-     *   IOPM,IOPI,IOPD,
-     *   IOPT,LUNI,  
-     *   IRC)
-      
-      If(OPTA) then
-         Continue         
-      Else if(IOPT.LT.KCUT) then
-         go to  50
-      End if 
-      
-* do not compute alignments if no format modifier specified
-* and the disjointness is 'UNIQUE'
-
-      If(.NOT.LOUT.AND.LUNI) go to  30 
-      
-* initialize sequence lock
-      
-      Do I1=1,LSEQ
-         LCKS(I1)=.FALSE.
-      End do  
-      
-* find optimal match
-
-      If(LUNI) then
-         Call XALIP
-     *      (NABC,LPRF,LPCI,NDIP(1),NDIP(2),
-     *      IOPT,IIPP,IMPP,CHIP,CHMP,IIPX,
-     *      BSEQ,LSEQ,ISEQ,LCKS,
-     *      IOPM,IOPI,IOPD,
-     *      IOMB,IOM1,IOM2,IOIB,IOI1,IOI2,IODB,IOD1,IOD2,
-     *      NALI,IALS,IALB,IAL1,IAL2,IALE,
-     *      LUNI,
-     *      IRC)
-      Else
-         
-* find all matches 
-         
-         Call XALIP
-     *      (NABC,LPRF,LPCI,NDIP(1),NDIP(2),
-     *      KCUT,IIPP,IMPP,CHIP,CHMP,IIPX,
-     *      BSEQ,LSEQ,ISEQ,LCKS,
-     *      IOPM,IOPI,IOPD,
-     *      IOMB,IOM1,IOM2,IOIB,IOI1,IOI2,IODB,IOD1,IOD2,
-     *      NALI,IALS,IALB,IAL1,IAL2,IALE,
-     *      LUNI,
-     *      IRC)
-      End if
-      If(IRC.NE.0) then
-         Write(NERR,*) '       While processing profile ',
-     *      CPID(1:Lblnk(CPID))
-         IRC=0
-         Go to 50
-      End if
-
-
-* remove sequence lock if alignments are to be generated
-
-      If(LTRA) then 
-         Do I1=1,LSEQ
-            LCKS(I1)=.FALSE.
-         End do 
-      End if 
-      
-* OUTPUT 
-
- 30   Continue         
-      
-      If(LUNI) then 
-         NALI=1
-         IALS(1)=IOPT
-      End if 
-      
-      if(OPTJ .AND. (NALI > 0)) then
-            Do I1=1,LSEQ
-               CALI(I1)=Char(Ichar(CABC(ISEQ(I1))))
-            End do
-            Call JPRSM(CSID,CSAC,CSFH,OPTF,1,LSEQ)
-            Call PRSP(CABC,ISEQ,CALI,1,LSEQ,NW,OPTS,OPTX)
-      End if
-
-      Do  40 I1=1,NALI
-         JSEQ=JSEQ+1
-         
-         If(LTRA) then 
-            Call XALIT
-     *         (CABC,LPRF,LPCI,NDIP(1),NDIP(2),
-     *         IIPP,IMPP,IIPX,
-     *         LSEQ,ISEQ,LCKS,
-     *         IOPM,IOPI,IOPD,
-     *         LALI,CALI,CPMA,IMSC,
-     *         IALS(I1),IALB(I1),IALE(I1),
-     *         NMAT(I1),
-     *         PK2E,PK2B,PK3E,PK3B,
-     *         PJ1E,PJ1B,PLAL,
-     *         OPTM,
-     *         IPMB,IPME,
-     *         IRC)
-            If(IRC.GT.0) Go to 100
-            Do  I2=IAL1(I1),IAL2(I1)
-               LCKS(I2)=.TRUE.
-            End do
-         End if 
-
-         If(.NOT.OPTK) then
-            Call WPRSM(JSEQ,NMAT(I1),.FALSE.,
-     *         LUNI,LOUT,LNOR,LREV,LPFA,OPTZ,OPTL,OPLU,NW,
-     *         CSID,CSAC,CSDE,OPTD,OPTR,LDRS,
-     *         IALS(I1),IALB(I1),IALE(I1),NALI,IPMB,IPME,
-     *         JCUT,MCLE,CCUT,ICUT,JCNM,RCUT,MCUT,
-     *         RNOP,KNPM,MAXN,INOR,IFUN,MNUM,LSEQ,RAVE)
-         Else
-            Call XPRSM(JSEQ,NMAT(I1),.FALSE.,
-     *         LUNI,LOUT,LNOR,LREV,OPTZ,OPTL,OPLU,OPTB,
-     *         CSID,CSAC,CSFH,CPID,CPAC,OPTR,OPTF,LDRS,
-     *         IALS(I1),IALB(I1),IALE(I1),NALI,IPMB,IPME,
-     *         JCUT,MCLE,CCUT,ICUT,JCNM,RCUT,MCUT,
-     *         RNOP,KNPM,MAXN,INOR,IFUN,MNUM,LSEQ,RAVE)
-         End if
-
-         If     (OPTS) then
-            Call PRSP(CABC,ISEQ,CALI,IALB(I1),IALE(I1),NW,OPTS,OPTX)
-         Else if(OPTX) then
-            Call PRSP(CABC,ISEQ,CALI,1,LALI,NW,OPTS,OPTX)
-         Else if(OPTY) then 
-            Call PRALI
-     *         (LPRF,CHIP,CHMP,IDMP,LSEQ,LREV,
-     *         CALI,LALI,IALB(I1),IALE(I1),NW)
-         End if 
-         
-*----------------------------------------------------------------------*
-* Compute single repeats for circular profiles
-*----------------------------------------------------------------------*
-         
-         If(OPTM) then
-            If(NMAT(I1).GT.1) then
-               Do I2=NMAT(I1),1,-1
-                  If(.NOT.OPTK) then
-                     Call WPRSM(JSEQ,NMAT(I1)-I2+1,.TRUE.,
-     *                  LUNI,LOUT,LNOR,LREV,LPFA,OPTZ,OPTL,OPLU,NW,
-     *                  CSID,CSAC,CSDE,OPTD,OPTR,LDRS,
-     *                  IMSC(I2),PK2B(I2),PK2E(I2),NALI,
-     *                  PK3B(I2),PK3E(I2)-LPRF-1,
-     *                  JCUT,MCLE,CCUT,ICUT,JCNM,RCUT,MCUT,
-     *                  RNOP,KNPM,MAXN,INOR,IFUN,MNUM,LSEQ,RAVE)
-                  Else
-                     Call XPRSM(JSEQ,NMAT(I1)-I2+1,.TRUE.,
-     *                  LUNI,LOUT,LNOR,LREV,OPTZ,OPTL,OPLU,OPTB,
-     *                  CSID,CSAC,CSFH,CPID,CPAC,OPTR,OPTF,LDRS,
-     *                  IMSC(I2),PK2B(I2),PK2E(I2),NALI,
-     *                  PK3B(I2),PK3E(I2)-LPRF-1,
-     *                  JCUT,MCLE,CCUT,ICUT,JCNM,RCUT,MCUT,
-     *                  RNOP,KNPM,MAXN,INOR,IFUN,MNUM,LSEQ,RAVE)
-                  End if
-                  
-                  If     (OPTS) then
-                     Call PRSP(CABC,ISEQ,CALI,PK2B(I2),PK2E(I2),
-     *                  NW,OPTS,OPTX)
-                  Else if(OPTX) then
-                     Call PRXP(CALI,PJ1B(I2),PJ1B(I2)+PLAL(I2)-1,
-     *                  PK3B(I2),PK3E(I2),LPRF,NW)
-                  Else if(OPTY) then 
-                     Call PMALI
-     *                  (LPRF,CHIP,CHMP,IDMP,LSEQ,LREV,CALI,
-     *                  PK2B(I2),PK3E(I2),PK3B(I2),PJ1E(I2),PJ1B(I2),NW)
-                  End if 
-                  
-               End do
-* End loop over repeats
-            End if
-         End if
-* End loop over matches
-         
-         
- 40   Continue
-
-
- 50   Continue
-      
-      If(OPTB) then 
-         If(LREV) then 
-            LREV=.FALSE.
-            Go to  20
-         Else
-            Continue
-         End if
-      Else
-         Go to  20
-      End if
-      
-*----------------------------------------------------------------------*
-* Complementary strand 
-*----------------------------------------------------------------------*
-      
-      LREV=.TRUE.
-      
-* generate complementary sequence
-      
-      J1=LSEQ          
-      Do  I1=1,LSEQ/2
-         IS=ISEQ(I1)
-         ISEQ(I1)=ISEQ(J1)
-         ISEQ(J1)=IS
-         J1=J1-1
-      End do  
-      
-      Do  I1=1,LSEQ
-         If(ISEQ(I1).NE.0) ISEQ(I1)=NABC-ISEQ(I1)+1
-      End do
-      
-      Go to  25
-      
- 100  Call Exit(IRC)
-
-* errors
-
- 901  Write(NERR,*) 'Error: Normalisation mode ',NMOD,' is not'//
-     *   ' defined.'
-      Write(NERR,*) '       While processing profile ',
-     *   CPID(1:Lblnk(CPID))
-      IRC=1
-      Go to 100
- 902  Write(NERR,*) 'Error: Cut-off must be a real number when option'//
-     *   ' -M is used.'
-      IRC=1
-      Go to 100
- 903  Write(NERR,*) 'Error: Normalisation mode ',NMOD,' is not'//
-     *   'defined for level 0 cut-off.'
-      Write(NERR,*) '       While processing profile ',
-     *   CPID(1:Lblnk(CPID))
-      IRC=1
-      Go to 100
- 904  Write(NERR,*) 'Error: Normalisation mode(s)',MCUT(I2,I1),
-     *   ' of level',MCLE(I1),' is not defined in the profile.'
-      Write(NERR,*) '       While processing profile ',
-     *   CPID(1:Lblnk(CPID))
-      IRC=1
-      Go to 100
-
-      End
-*----------------------------------------------------------------------*     
-      Subroutine Repar(
-     *   OPTA,OPTB,OPTF,OPTL,OPLU,OPTR,OPTS,OPTU,OPTX,OPTY,OPTZ,OPTM,
-     *   OPTK,OPTJ,FPRF,FSEQ,NCUC,KCUC,XCUC,NW,NMOD,OPTO,OPTD,OPTV,IRC)
-      
-      Logical           OPTA 
-      Logical           OPTB 
-      Logical           OPTF 
-      Logical           OPTL 
-      Logical           OPLU 
-      Logical           OPTR 
-      Logical           OPTS 
-      Logical           OPTU 
-      Logical           OPTX 
-      Logical           OPTY 
-      Logical           OPTZ 
-      Logical           OPTM
-      Logical           OPTK
-      Logical           OPTJ
-      Logical           OPTO
-      Logical           OPTD
-      Logical           OPTV
-      
-      Character*(*)     FPRF
-      Character*(*)     FSEQ
-      Character*512     CARG
-      
-      IRC=0
-      NCUC=0
-      OPTA=.FALSE.
-      OPTB=.FALSE.
-      OPTF=.FALSE.
-      OPTL=.FALSE.
-      OPLU=.FALSE.
-      OPTR=.FALSE.
-      OPTS=.FALSE.
-      OPTU=.FALSE.
-      OPTX=.FALSE.
-      OPTY=.FALSE.
-      OPTZ=.FALSE.
-      OPTM=.FALSE.
-      OPTO=.FALSE.
-      OPTK=.FALSE.
-      OPTJ=.FALSE.
-      OPTD=.FALSE.
-      OPTV=.FALSE.
-      
-      NW=60
-      
-      N1=Iargc()
-      
-      K1=0
-      I2=1
-      Do  10 I1=1,N1
-         Call GetArg(I2,CARG)
-         If     (CARG(1:1).EQ.'-'.
-     *      AND.CARG(2:2).NE.' '.AND.K1.LT.1) then
-            If(Index(CARG,'h').NE.0) go to 900
-            If(Index(CARG,'a').NE.0) OPTA=.TRUE.
-            If(Index(CARG,'b').NE.0) OPTB=.TRUE.
-            If(Index(CARG,'d').NE.0) OPTD=.TRUE.
-            If(Index(CARG,'f').NE.0) OPTF=.TRUE.
-            If(Index(CARG,'l').NE.0) OPTL=.TRUE.
-            If(Index(CARG,'L').NE.0) OPLU=.TRUE.
-            If(Index(CARG,'r').NE.0) OPTR=.TRUE.
-            If(Index(CARG,'s').NE.0) OPTS=.TRUE.
-            If(Index(CARG,'u').NE.0) OPTU=.TRUE.
-            If(Index(CARG,'x').NE.0) OPTX=.TRUE.
-            If(Index(CARG,'y').NE.0) OPTY=.TRUE.
-            If(Index(CARG,'z').NE.0) OPTZ=.TRUE.
-            If(Index(CARG,'m').NE.0) OPTM=.TRUE.
-            If(Index(CARG,'k').NE.0) OPTK=.TRUE.
-            If(Index(CARG,'j').NE.0) OPTJ=.TRUE.
-            If(Index(CARG,'v').NE.0) OPTV=.TRUE.
-            If(Index(CARG,'W').NE.0) then
-               If(CARG(3:3).NE.' ') then
-                  Read(CARG(3:),*,Err=900) NW
-               Else
-                  I2=I2+1
-                  Call GetArg(I2,CARG)
-                  Read(CARG,*,Err=900) NW
-               End if
-            End if
-            If(Index(CARG,'C').NE.0) then
-               If(CARG(3:3).NE.' ') then
-                  CARG(1:2)='  '
-               Else
-                  I2=I2+1
-                  Call GetArg(I2,CARG)
-               End if
-               If(Index(CARG,'.').EQ.0) then
-                  NCUC=1 
-                  Read(CARG,*,Err=900) KCUC
-               Else 
-                  NCUC=2
-                  Read(CARG,*,Err=900) XCUC
-               End if 
-            End if
-            If(Index(CARG,'M').NE.0) then
-               If(CARG(3:3).NE.' ') then
-                  Read(CARG(3:),*,Err=900) NMOD
-               Else
-                  I2=I2+1
-                  Call GetArg(I2,CARG)
-                  Read(CARG,*,Err=900) NMOD
-               End if
-               OPTO=.TRUE.
-            End if
-         Else if(K1.LE.1) then
-            K1=K1+1
-            If     (K1.EQ.1) then 
-               FPRF=CARG
-            Else if(K1.EQ.2) then
-               FSEQ=CARG
-            End if  
-         Else 
-
-* - cut-off value on command line    
-
-            If     (CARG(1:2).EQ.'C=') then
-               CARG(1:2)='  '
-               If(Index(CARG,'.').EQ.0) then
-                  NCUC=1 
-                  Read(CARG,*,Err=900) KCUC
-               Else 
-                  NCUC=2
-                  Read(CARG,*,Err=900) XCUC
-               End if 
-
-* - output width on command line
-
-            Else if(CARG(1:2).EQ.'W=') then
-               Read(CARG(3:),*,Err=900) NW
-            End if
-         End if
-         I2=I2+1
-         If(I2.GT.N1) Go to 20
- 10   Continue 
-      
- 20   If (K1.NE.2) IRC=1 
-      
- 100  If(NW.LE.0.OR.NW.GT.512) NW=60
-      Return
- 900  IRC=1
-      Go to 100
-      End 
-*----------------------------------------------------------------------*     
-      Include          'reprf.f'
-      Include          'reseq.f'
-      Include          'rfseq.f'
-      Include          'xali1.f'
-      Include          'xalip.f'
-      Include          'RtoN.f'
-      Include          'NtoR.f'
-      Include          'CFAve.f'
-      Include          'CPAve.f'
-      Include          'wprsm.f'
-      Include          'xprsm.f'
-      Include          'jprsm.f'
-      Include          'xalit.f'
-      Include          'lblnk.f'
-      Include          'prali.f'
-      Include          'pmali.f'
-      Include          'prsp.f'
-      Include          'prxp.f'
-      Include          'Xblnk.f'
-      
diff --git a/psa.5 b/psa.5
deleted file mode 100644
index fc66a4f..0000000
--- a/psa.5
+++ /dev/null
@@ -1,197 +0,0 @@
-.\"
-.\" $Id: psa.5,v 1.1 2003/04/28 13:46:55 vflegel Exp $
-.\" Copyright (c) 2003 Volker Flegel <Volker.Flegel at isb-sib.ch>
-.\" Process this file with
-.\" groff -man -Tascii <name>
-.\" for ascii output or
-.\" groff -man -Tps <name>
-.\" for postscript output
-.\"
-.TH PSA 5 "April 2003" "pftools 2.3" "File formats"
-.\" ------------------------------------------------
-.\" Name section
-.\" ------------------------------------------------
-.SH NAME
-psa \- biological sequence alignment file format
-.\" ------------------------------------------------
-.\" Description section
-.\" ------------------------------------------------
-.SH DESCRIPTION
-.B psa
-is an output format used by the
-.B pftools
-package to describe alignments between biological sequences (DNA or protein) and
-.I PROSITE
-profiles.
-.PP
-.B psa
-is apparented to the widely used biological sequence file format
-.IR fasta .
-Nevertheless it does not only describe a biological sequence, it is especially used to include
-information of alignments between a motif descriptor like a
-.I PROSITE
-profile and a given sequence. This information is included in the header and reflected
-in the structure of the sequence following the header line.
-.\" ------------------------------------------------
-.\" Syntax section
-.\" ------------------------------------------------
-.SH SYNTAX
-Each sequence in a
-.B psa
-alignment file or output must be preceded by a
-.I fasta
-header line.
-.br
-The general syntax of such a
-.I fasta
-header line is as follows:
-.sp
-.RS
-.BI > seq_id
-.RI "[ " free_text " ]" 
-.RE
-.sp
-The header must start with a
-.RB ' > '
-character which is directly followed by the
-.I seq_id
-field. This field is interpreted by most programs as the sequence's
-.I identifier
-and/or
-.I accession
-number. It ends at the first encountered whitespace character.
-.br
-The
-.B pftools
-programs will use the
-.I free_text
-to add information about the match score, position and description of the sequence or motif.
-Please refer to the man page of the corresponding programs for further information about
-the output formats.
-.br
-The header can only extend over one line. The following lines up to a new line starting with a
-.RB ' > '
-character or the end of the file are interpreted as sequence data.
-.sp
-The line following the header, starts the alignment data between a sequence and a 
-.I PROSITE
-profile. This data can span over several lines of different length.
-.br
-The data is formed by
-.I upper
-or
-.IR lower -case
-characters of the corresponding sequence alphabet (DNA or protein).
-The gap characters
-.RB ' . "' and '" - '
-are also supported.
-.br
-The alignment always has at least the length of the matching profile. Insertions or deletions
-detected during the motif/sequence alignment step will vary the length of the data reported,
-and can be identified using the following conventions:
-.RS
-.\" --- upper-case character ---
-.TP
-.I upper-case character
-Any upper-case character of the sequence alphabet identifies a
-.I match
-position between the sequence and the motif descriptor.
-.\" --- lower-case character ---
-.TP
-.I lower-case character
-A lower-case character of the sequence alphabet is used to symbolize an
-.I insertion
-in the sequence compared to the motif descriptor.
-.\" --- dash '-' character ---
-.TP
-.I '-' (dash) character
-A
-.RB ' - '
-character in the output identifies the presence of a
-.I deletion
-in the sequence compared to the motif descriptor.
-.RE
-.\" ------------------------------------------------
-.\" Examples section
-.\" ------------------------------------------------
-.SH EXAMPLES
-.TP
-(1)
->YD28_SCHPO 556 pos. 291 - 332 sp|Q10256|YD28_SCHPO
-.br
-PTDPGlnsKIAQLVSMGFDPLEAAQALDAANGDLDVAASFLL--
-.br
-
-This is an example of the output produced by
-.BR pfsearch (1)
-using the '-x' (i.e. 
-.B psa
-output) option. The first line starting with the
-.RB ' > '
-character is the
-.I fasta
-header. It also contains information about the raw score of the alignment as well as its
-position in the input sequence.
-.br
-On the next line you find the alignment proper. Starting at position 6, we can find an
-.I insertion
-of the
-.RI ' lns '
-residues in the sequence compared to the motif. The last two positions of the motif are
-not present in the sequence (i.e. they are
-.IR deleted ).
-This is indicated by the presence of two 
-.RB ' - '
-(dash) characters at the end of the alignment.
-.RE
-.\" ------------------------------------------------
-.\" Notes section
-.\" ------------------------------------------------
-.SH "NOTES"
-.TP
-(1)
-The
-.BR xpsa (5)
-format defines a more strict syntax of the header line, allowing the exchange of information between
-different sequence analysis tools. It uses
-.IR keyword = value
-pairs to annotate the current match between a sequence and a motif descriptor. This syntax can be
-easily parsed and extended, according to the needs of bioinformatic tools.
-.RE
-
-.TP
-(2)
-The current implementation of the
-.B pftools
-package does not use the
-.RB ' . '
-(dot) character in the 
-.B psa
-output. Nevertheless
-.BR psa2msa (1)
-will read it and interpret it in the same manner as the
-.RB ' - '
-(dash) character.
-.RE
-.\" ------------------------------------------------
-.\" See also section
-.\" ------------------------------------------------
-.SH "SEE ALSO"
-.BR xpsa (5),
-.BR pfsearch (1),
-.BR pfscan (1),
-.BR pfw (1),
-.BR pfmake (1),
-.BR psa2msa (1)
-.\" ------------------------------------------------
-.\" Author section
-.\" ------------------------------------------------
-.SH "AUTHOR"
-This manual page was originally written by Volker Flegel.
-.br
-The
-.B pftools
-package was developped by Philipp Bucher.
-.br
-Any comments or suggestions should be addressed to <pftools at isb-sib.ch>.
-
diff --git a/src/C/.deps/pfdump-io.Po b/src/C/.deps/pfdump-io.Po
new file mode 100644
index 0000000..a362a65
--- /dev/null
+++ b/src/C/.deps/pfdump-io.Po
@@ -0,0 +1,170 @@
+pfdump-io.o: utils/io.c /usr/include/stdc-predef.h /usr/include/stdlib.h \
+ /usr/include/features.h /usr/include/sys/cdefs.h \
+ /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
+ /usr/include/gnu/stubs-64.h \
+ /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.5/include/stddef.h \
+ /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h \
+ /usr/include/endian.h /usr/include/bits/endian.h \
+ /usr/include/bits/byteswap.h /usr/include/bits/types.h \
+ /usr/include/bits/typesizes.h /usr/include/bits/byteswap-16.h \
+ /usr/include/sys/types.h /usr/include/time.h /usr/include/sys/select.h \
+ /usr/include/bits/select.h /usr/include/bits/sigset.h \
+ /usr/include/bits/time.h /usr/include/bits/select2.h \
+ /usr/include/sys/sysmacros.h /usr/include/bits/pthreadtypes.h \
+ /usr/include/alloca.h /usr/include/bits/stdlib-bsearch.h \
+ /usr/include/bits/stdlib-float.h /usr/include/bits/stdlib.h \
+ /usr/include/stdio.h /usr/include/libio.h /usr/include/_G_config.h \
+ /usr/include/wchar.h \
+ /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.5/include/stdarg.h \
+ /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+ /usr/include/bits/stdio.h /usr/include/bits/stdio2.h \
+ /usr/include/inttypes.h \
+ /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.5/include/stdint.h \
+ /usr/include/stdint.h /usr/include/bits/wchar.h \
+ /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.5/include/stdbool.h \
+ /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.5/include/mm_malloc.h \
+ /usr/include/errno.h /usr/include/bits/errno.h \
+ /usr/include/linux/errno.h /usr/include/asm/errno.h \
+ /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
+ /usr/include/string.h /usr/include/xlocale.h /usr/include/bits/string.h \
+ /usr/include/bits/string2.h /usr/include/bits/string3.h \
+ /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.5/include-fixed/limits.h \
+ /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.5/include-fixed/syslimits.h \
+ /usr/include/limits.h /usr/include/bits/posix1_lim.h \
+ /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
+ /usr/include/bits/posix2_lim.h ../../src/C/include/profile.h \
+ /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.5/include/xmmintrin.h \
+ /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.5/include/mmintrin.h \
+ /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.5/include/emmintrin.h
+
+/usr/include/stdc-predef.h:
+
+/usr/include/stdlib.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/gnu/stubs-64.h:
+
+/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.5/include/stddef.h:
+
+/usr/include/bits/waitflags.h:
+
+/usr/include/bits/waitstatus.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/bits/byteswap.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/bits/byteswap-16.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/time.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/bits/select2.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/alloca.h:
+
+/usr/include/bits/stdlib-bsearch.h:
+
+/usr/include/bits/stdlib-float.h:
+
+/usr/include/bits/stdlib.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.5/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/bits/stdio2.h:
+
+/usr/include/inttypes.h:
+
+/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.5/include/stdint.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.5/include/stdbool.h:
+
+/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.5/include/mm_malloc.h:
+
+/usr/include/errno.h:
+
+/usr/include/bits/errno.h:
+
+/usr/include/linux/errno.h:
+
+/usr/include/asm/errno.h:
+
+/usr/include/asm-generic/errno.h:
+
+/usr/include/asm-generic/errno-base.h:
+
+/usr/include/string.h:
+
+/usr/include/xlocale.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/bits/string3.h:
+
+/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.5/include-fixed/limits.h:
+
+/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.5/include-fixed/syslimits.h:
+
+/usr/include/limits.h:
+
+/usr/include/bits/posix1_lim.h:
+
+/usr/include/bits/local_lim.h:
+
+/usr/include/linux/limits.h:
+
+/usr/include/bits/posix2_lim.h:
+
+../../src/C/include/profile.h:
+
+/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.5/include/xmmintrin.h:
+
+/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.5/include/mmintrin.h:
+
+/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.5/include/emmintrin.h:
diff --git a/src/C/.deps/pfsearchV3-pfsearch.Po b/src/C/.deps/pfsearchV3-pfsearch.Po
new file mode 100644
index 0000000..431232a
--- /dev/null
+++ b/src/C/.deps/pfsearchV3-pfsearch.Po
@@ -0,0 +1,210 @@
+pfsearchV3-pfsearch.o: prg/pfsearch.c /usr/include/stdc-predef.h \
+ /usr/include/features.h /usr/include/sys/cdefs.h \
+ /usr/include/bits/wordsize.h /usr/include/gnu/stubs.h \
+ /usr/include/gnu/stubs-64.h /usr/include/stdlib.h \
+ /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.5/include/stddef.h \
+ /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h \
+ /usr/include/endian.h /usr/include/bits/endian.h \
+ /usr/include/bits/byteswap.h /usr/include/bits/types.h \
+ /usr/include/bits/typesizes.h /usr/include/bits/byteswap-16.h \
+ /usr/include/xlocale.h /usr/include/sys/types.h /usr/include/time.h \
+ /usr/include/sys/select.h /usr/include/bits/select.h \
+ /usr/include/bits/sigset.h /usr/include/bits/time.h \
+ /usr/include/bits/select2.h /usr/include/sys/sysmacros.h \
+ /usr/include/bits/pthreadtypes.h /usr/include/alloca.h \
+ /usr/include/bits/stdlib-bsearch.h /usr/include/bits/stdlib-float.h \
+ /usr/include/bits/stdlib.h /usr/include/stdio.h /usr/include/libio.h \
+ /usr/include/_G_config.h /usr/include/wchar.h \
+ /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.5/include/stdarg.h \
+ /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
+ /usr/include/bits/stdio.h /usr/include/bits/stdio2.h \
+ /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.5/include/mm_malloc.h \
+ /usr/include/sys/time.h /usr/include/pthread.h /usr/include/sched.h \
+ /usr/include/bits/sched.h /usr/include/bits/timex.h \
+ /usr/include/bits/setjmp.h /usr/include/inttypes.h \
+ /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.5/include/stdint.h \
+ /usr/include/stdint.h /usr/include/bits/wchar.h /usr/include/getopt.h \
+ /usr/include/unistd.h /usr/include/bits/posix_opt.h \
+ /usr/include/bits/environments.h /usr/include/bits/confname.h \
+ /usr/include/bits/unistd.h /usr/include/sys/mman.h \
+ /usr/include/bits/mman.h /usr/include/bits/mman-linux.h \
+ ../../src/C/include/profile.h \
+ /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.5/include/stdbool.h \
+ /usr/include/string.h /usr/include/bits/string.h \
+ /usr/include/bits/string2.h /usr/include/bits/string3.h \
+ /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.5/include/xmmintrin.h \
+ /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.5/include/mmintrin.h \
+ /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.5/include/emmintrin.h \
+ ../../src/C/include/sequence.h /usr/include/sys/stat.h \
+ /usr/include/bits/stat.h /usr/include/fcntl.h /usr/include/bits/fcntl.h \
+ /usr/include/bits/fcntl-linux.h /usr/include/bits/uio.h \
+ /usr/include/bits/fcntl2.h ../../src/C/include/profile.h \
+ ../../src/C/include/system.h /usr/include/sys/utsname.h \
+ /usr/include/bits/utsname.h /usr/include/pwd.h prg/threads.h \
+ prg/../include/system.h
+
+/usr/include/stdc-predef.h:
+
+/usr/include/features.h:
+
+/usr/include/sys/cdefs.h:
+
+/usr/include/bits/wordsize.h:
+
+/usr/include/gnu/stubs.h:
+
+/usr/include/gnu/stubs-64.h:
+
+/usr/include/stdlib.h:
+
+/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.5/include/stddef.h:
+
+/usr/include/bits/waitflags.h:
+
+/usr/include/bits/waitstatus.h:
+
+/usr/include/endian.h:
+
+/usr/include/bits/endian.h:
+
+/usr/include/bits/byteswap.h:
+
+/usr/include/bits/types.h:
+
+/usr/include/bits/typesizes.h:
+
+/usr/include/bits/byteswap-16.h:
+
+/usr/include/xlocale.h:
+
+/usr/include/sys/types.h:
+
+/usr/include/time.h:
+
+/usr/include/sys/select.h:
+
+/usr/include/bits/select.h:
+
+/usr/include/bits/sigset.h:
+
+/usr/include/bits/time.h:
+
+/usr/include/bits/select2.h:
+
+/usr/include/sys/sysmacros.h:
+
+/usr/include/bits/pthreadtypes.h:
+
+/usr/include/alloca.h:
+
+/usr/include/bits/stdlib-bsearch.h:
+
+/usr/include/bits/stdlib-float.h:
+
+/usr/include/bits/stdlib.h:
+
+/usr/include/stdio.h:
+
+/usr/include/libio.h:
+
+/usr/include/_G_config.h:
+
+/usr/include/wchar.h:
+
+/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.5/include/stdarg.h:
+
+/usr/include/bits/stdio_lim.h:
+
+/usr/include/bits/sys_errlist.h:
+
+/usr/include/bits/stdio.h:
+
+/usr/include/bits/stdio2.h:
+
+/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.5/include/mm_malloc.h:
+
+/usr/include/sys/time.h:
+
+/usr/include/pthread.h:
+
+/usr/include/sched.h:
+
+/usr/include/bits/sched.h:
+
+/usr/include/bits/timex.h:
+
+/usr/include/bits/setjmp.h:
+
+/usr/include/inttypes.h:
+
+/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.5/include/stdint.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wchar.h:
+
+/usr/include/getopt.h:
+
+/usr/include/unistd.h:
+
+/usr/include/bits/posix_opt.h:
+
+/usr/include/bits/environments.h:
+
+/usr/include/bits/confname.h:
+
+/usr/include/bits/unistd.h:
+
+/usr/include/sys/mman.h:
+
+/usr/include/bits/mman.h:
+
+/usr/include/bits/mman-linux.h:
+
+../../src/C/include/profile.h:
+
+/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.5/include/stdbool.h:
+
+/usr/include/string.h:
+
+/usr/include/bits/string.h:
+
+/usr/include/bits/string2.h:
+
+/usr/include/bits/string3.h:
+
+/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.5/include/xmmintrin.h:
+
+/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.5/include/mmintrin.h:
+
+/usr/lib/gcc/x86_64-pc-linux-gnu/4.8.5/include/emmintrin.h:
+
+../../src/C/include/sequence.h:
+
+/usr/include/sys/stat.h:
+
+/usr/include/bits/stat.h:
+
+/usr/include/fcntl.h:
+
+/usr/include/bits/fcntl.h:
+
+/usr/include/bits/fcntl-linux.h:
+
+/usr/include/bits/uio.h:
+
+/usr/include/bits/fcntl2.h:
+
+../../src/C/include/profile.h:
+
+../../src/C/include/system.h:
+
+/usr/include/sys/utsname.h:
+
+/usr/include/bits/utsname.h:
+
+/usr/include/pwd.h:
+
+prg/threads.h:
+
+prg/../include/system.h:
diff --git a/src/C/Makefile b/src/C/Makefile
new file mode 100644
index 0000000..e176310
--- /dev/null
+++ b/src/C/Makefile
@@ -0,0 +1,554 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# src/C/Makefile.  Generated from Makefile.in by configure.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+
+pkgdatadir = $(datadir)/pftools
+pkgincludedir = $(includedir)/pftools
+pkglibdir = $(libdir)/pftools
+pkglibexecdir = $(libexecdir)/pftools
+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 = x86_64-unknown-linux-gnu
+host_triplet = x86_64-unknown-linux-gnu
+target_triplet = x86_64-unknown-linux-gnu
+bin_PROGRAMS = pfdump$(EXEEXT) pfsearchV3$(EXEEXT)
+subdir = src/C
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/C/include/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_pfdump_OBJECTS = pfdump-io.$(OBJEXT)
+pfdump_OBJECTS = $(am_pfdump_OBJECTS)
+pfdump_LDADD = $(LDADD)
+am_pfsearchV3_OBJECTS = pfsearchV3-pfsearch.$(OBJEXT)
+pfsearchV3_OBJECTS = $(am_pfsearchV3_OBJECTS)
+pfsearchV3_DEPENDENCIES = Normalization.o ReadSequence.o output.o io.o \
+	heuristic_sse2.o xali1_sse2.o xalip_sse2.o xalit_sse2.o \
+	heuristic_sse41.o xali1_sse41.o xalip_sse41.o xalit_sse41.o
+pfsearchV3_LINK = $(CCLD) $(pfsearchV3_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. -I$(top_builddir)/src/C/include
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(pfdump_SOURCES) $(pfsearchV3_SOURCES)
+DIST_SOURCES = $(pfdump_SOURCES) $(pfsearchV3_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /home/lcerutti/home/projects/prosite/prfh/pftools/branches/pftools/missing --run aclocal-1.11
+ALLOCA = 
+AMTAR = ${SHELL} /home/lcerutti/home/projects/prosite/prfh/pftools/branches/pftools/missing --run tar
+AUTOCONF = ${SHELL} /home/lcerutti/home/projects/prosite/prfh/pftools/branches/pftools/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/lcerutti/home/projects/prosite/prfh/pftools/branches/pftools/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/lcerutti/home/projects/prosite/prfh/pftools/branches/pftools/missing --run automake-1.11
+AWK = mawk
+CC = gcc -std=gnu99
+CCDEPMODE = depmode=gcc3
+CFLAGS = -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse
+CPP = 
+CPPFLAGS = 
+CYGPATH_W = echo
+DEFS = -DHAVE_CONFIG_H
+DEPDIR = .deps
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = 
+EXEEXT = 
+F77 = gfortran
+FFLAGS = -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse
+FPP_OPTION = -cpp
+GREP = 
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+INTEL_IMF = 
+LDFLAGS = 
+LIBOBJS =  ${LIBOBJDIR}malloc$U.o
+LIBS = -lm 
+LTLIBOBJS =  ${LIBOBJDIR}malloc$U.lo
+MAKEINFO = ${SHELL} /home/lcerutti/home/projects/prosite/prfh/pftools/branches/pftools/missing --run makeinfo
+MKDIR_P = /bin/mkdir -p
+OBJEXT = o
+PACKAGE = pftools
+PACKAGE_BUGREPORT = thierry.schuepbach at isb-sib.ch
+PACKAGE_NAME = PfTools
+PACKAGE_STRING = PfTools 3.0
+PACKAGE_TARNAME = pftools
+PACKAGE_URL = 
+PACKAGE_VERSION = 3.0
+PATH_SEPARATOR = :
+PTHREAD_CC = gcc -std=gnu99
+PTHREAD_CFLAGS = -pthread
+PTHREAD_LIBS = 
+SET_MAKE = 
+SHELL = /bin/bash
+SIMD_SSE2_CFLAGS = -msse2
+SIMD_SSE4_1_CFLAGS = -msse4.1
+STRIP = 
+USE_AFFINITY = -D__USE_AFFINITY__
+USE_MMAP = -D__USE_MMAP__
+VERSION = 3.0
+abs_builddir = /home/lcerutti/home/projects/prosite/prfh/pftools/branches/pftools/src/C
+abs_srcdir = /home/lcerutti/home/projects/prosite/prfh/pftools/branches/pftools/src/C
+abs_top_builddir = /home/lcerutti/home/projects/prosite/prfh/pftools/branches/pftools
+abs_top_srcdir = /home/lcerutti/home/projects/prosite/prfh/pftools/branches/pftools
+ac_ct_CC = gcc
+ac_ct_F77 = gfortran
+am__include = include
+am__leading_dot = .
+am__quote = 
+am__tar = ${AMTAR} chof - "$$tardir"
+am__untar = ${AMTAR} xf -
+ax_pthread_config = 
+bindir = ${exec_prefix}/bin
+build = x86_64-unknown-linux-gnu
+build_alias = 
+build_cpu = x86_64
+build_os = linux-gnu
+build_vendor = unknown
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = x86_64-unknown-linux-gnu
+host_alias = 
+host_cpu = x86_64
+host_os = linux-gnu
+host_vendor = unknown
+htmldir = ${docdir}
+includedir = ${prefix}/include
+infodir = ${datarootdir}/info
+install_sh = ${SHELL} /home/lcerutti/home/projects/prosite/prfh/pftools/branches/pftools/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+mandir = ${datarootdir}/man
+mkdir_p = /bin/mkdir -p
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+prefix = /usr/local
+program_transform_name = s,x,x,
+psdir = ${docdir}
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = ${prefix}/etc
+target = x86_64-unknown-linux-gnu
+target_alias = 
+target_cpu = x86_64
+target_os = linux-gnu
+target_vendor = unknown
+top_build_prefix = ../../
+top_builddir = ../..
+top_srcdir = ../..
+AM_CFLAGS = -O3
+pfdump_SOURCES = utils/io.c
+pfdump_CPPFLAGS = -D_TEST 
+pfsearchV3_SOURCES = prg/pfsearch.c
+pfsearchV3_LDADD = Normalization.o ReadSequence.o output.o io.o \
+		   heuristic_sse2.o xali1_sse2.o xalip_sse2.o xalit_sse2.o \
+		   heuristic_sse41.o xali1_sse41.o xalip_sse41.o xalit_sse41.o \
+		    -lm
+
+pfsearchV3_CPPFLAGS = -D__USE_MMAP__ -D__USE_AFFINITY__
+pfsearchV3_CFLAGS = -O3 -pthread
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/C/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/C/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	      echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	      $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+pfdump$(EXEEXT): $(pfdump_OBJECTS) $(pfdump_DEPENDENCIES) 
+	@rm -f pfdump$(EXEEXT)
+	$(LINK) $(pfdump_OBJECTS) $(pfdump_LDADD) $(LIBS)
+pfsearchV3$(EXEEXT): $(pfsearchV3_OBJECTS) $(pfsearchV3_DEPENDENCIES) 
+	@rm -f pfsearchV3$(EXEEXT)
+	$(pfsearchV3_LINK) $(pfsearchV3_OBJECTS) $(pfsearchV3_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+include ./$(DEPDIR)/pfdump-io.Po
+include ./$(DEPDIR)/pfsearchV3-pfsearch.Po
+
+.c.o:
+	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+#	source='$<' object='$@' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#	$(COMPILE) -c $<
+
+.c.obj:
+	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+#	source='$<' object='$@' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+pfdump-io.o: utils/io.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pfdump_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pfdump-io.o -MD -MP -MF $(DEPDIR)/pfdump-io.Tpo -c -o pfdump-io.o `test -f 'utils/io.c' || echo '$(srcdir)/'`utils/io.c
+	$(am__mv) $(DEPDIR)/pfdump-io.Tpo $(DEPDIR)/pfdump-io.Po
+#	source='utils/io.c' object='pfdump-io.o' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pfdump_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pfdump-io.o `test -f 'utils/io.c' || echo '$(srcdir)/'`utils/io.c
+
+pfdump-io.obj: utils/io.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pfdump_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pfdump-io.obj -MD -MP -MF $(DEPDIR)/pfdump-io.Tpo -c -o pfdump-io.obj `if test -f 'utils/io.c'; then $(CYGPATH_W) 'utils/io.c'; else $(CYGPATH_W) '$(srcdir)/utils/io.c'; fi`
+	$(am__mv) $(DEPDIR)/pfdump-io.Tpo $(DEPDIR)/pfdump-io.Po
+#	source='utils/io.c' object='pfdump-io.obj' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pfdump_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pfdump-io.obj `if test -f 'utils/io.c'; then $(CYGPATH_W) 'utils/io.c'; else $(CYGPATH_W) '$(srcdir)/utils/io.c'; fi`
+
+pfsearchV3-pfsearch.o: prg/pfsearch.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pfsearchV3_CPPFLAGS) $(CPPFLAGS) $(pfsearchV3_CFLAGS) $(CFLAGS) -MT pfsearchV3-pfsearch.o -MD -MP -MF $(DEPDIR)/pfsearchV3-pfsearch.Tpo -c -o pfsearchV3-pfsearch.o `test -f 'prg/pfsearch.c' || echo '$(srcdir)/'`prg/pfsearch.c
+	$(am__mv) $(DEPDIR)/pfsearchV3-pfsearch.Tpo $(DEPDIR)/pfsearchV3-pfsearch.Po
+#	source='prg/pfsearch.c' object='pfsearchV3-pfsearch.o' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pfsearchV3_CPPFLAGS) $(CPPFLAGS) $(pfsearchV3_CFLAGS) $(CFLAGS) -c -o pfsearchV3-pfsearch.o `test -f 'prg/pfsearch.c' || echo '$(srcdir)/'`prg/pfsearch.c
+
+pfsearchV3-pfsearch.obj: prg/pfsearch.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pfsearchV3_CPPFLAGS) $(CPPFLAGS) $(pfsearchV3_CFLAGS) $(CFLAGS) -MT pfsearchV3-pfsearch.obj -MD -MP -MF $(DEPDIR)/pfsearchV3-pfsearch.Tpo -c -o pfsearchV3-pfsearch.obj `if test -f 'prg/pfsearch.c'; then $(CYGPATH_W) 'prg/pfsearch.c'; else $(CYGPATH_W) '$(srcdir)/prg/pfsearch.c'; fi`
+	$(am__mv) $(DEPDIR)/pfsearchV3-pfsearch.Tpo $(DEPDIR)/pfsearchV3-pfsearch.Po
+#	source='prg/pfsearch.c' object='pfsearchV3-pfsearch.obj' libtool=no \
+#	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pfsearchV3_CPPFLAGS) $(CPPFLAGS) $(pfsearchV3_CFLAGS) $(CFLAGS) -c -o pfsearchV3-pfsearch.obj `if test -f 'prg/pfsearch.c'; then $(CYGPATH_W) 'prg/pfsearch.c'; else $(CYGPATH_W) '$(srcdir)/prg/pfsearch.c'; 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)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-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:
+
+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
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic ctags distclean distclean-compile \
+	distclean-generic distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-binPROGRAMS \
+	install-data install-data-am install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-info install-info-am install-man install-pdf \
+	install-pdf-am install-ps install-ps-am install-strip \
+	installcheck installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-binPROGRAMS
+
+
+io.o : utils/io.c
+	$(COMPILE) -c utils/io.c
+Normalization.o : utils/Normalization.c
+	$(COMPILE) -c utils/Normalization.c
+ReadSequence.o : utils/ReadSequence.c
+	$(COMPILE) -c utils/ReadSequence.c
+output.o : utils/output.c
+	$(COMPILE) -c utils/output.c
+
+heuristic_sse2.o : sse2/heuristic_sse2.c
+	$(COMPILE) -c sse2/heuristic_sse2.c
+xali1_sse2.o : sse2/xali1_sse2.c
+	$(COMPILE) -c sse2/xali1_sse2.c
+xalip_sse2.o : sse2/xalip_sse2.c
+	$(COMPILE) -c sse2/xalip_sse2.c
+xalit_sse2.o : sse2/xalit_sse2.c
+	$(COMPILE) -c sse2/xalit_sse2.c
+
+heuristic_sse41.o : sse41/heuristic_sse41.c
+	$(COMPILE) -msse4.1 -c sse41/heuristic_sse41.c
+xali1_sse41.o : sse41/xali1_sse41.c
+	$(COMPILE) -msse4.1 -c sse41/xali1_sse41.c
+xalip_sse41.o : sse41/xalip_sse41.c
+	$(COMPILE) -msse4.1 -c sse41/xalip_sse41.c
+xalit_sse41.o : sse41/xalit_sse41.c
+	$(COMPILE) -msse4.1 -c sse41/xalit_sse41.c
+
+# 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/C/Makefile.am b/src/C/Makefile.am
new file mode 100644
index 0000000..505f2ad
--- /dev/null
+++ b/src/C/Makefile.am
@@ -0,0 +1,40 @@
+AM_CFLAGS = -O3
+bin_PROGRAMS = pfdump pfsearchV3
+
+pfdump_SOURCES = utils/io.c
+pfdump_CPPFLAGS = -D_TEST 
+
+pfsearchV3_SOURCES = prg/pfsearch.c
+pfsearchV3_LDADD = Normalization.o ReadSequence.o output.o io.o \
+		   heuristic_sse2.o xali1_sse2.o xalip_sse2.o xalit_sse2.o \
+		   heuristic_sse41.o xali1_sse41.o xalip_sse41.o xalit_sse41.o \
+		   @INTEL_IMF@ -lm
+pfsearchV3_CPPFLAGS = @USE_MMAP@ @USE_AFFINITY@
+pfsearchV3_CFLAGS = -O3 @PTHREAD_CFLAGS@
+
+io.o : utils/io.c
+	$(COMPILE) -c utils/io.c
+Normalization.o : utils/Normalization.c
+	$(COMPILE) -c utils/Normalization.c
+ReadSequence.o : utils/ReadSequence.c
+	$(COMPILE) -c utils/ReadSequence.c
+output.o : utils/output.c
+	$(COMPILE) -c utils/output.c
+
+heuristic_sse2.o : sse2/heuristic_sse2.c
+	$(COMPILE) -c sse2/heuristic_sse2.c
+xali1_sse2.o : sse2/xali1_sse2.c
+	$(COMPILE) -c sse2/xali1_sse2.c
+xalip_sse2.o : sse2/xalip_sse2.c
+	$(COMPILE) -c sse2/xalip_sse2.c
+xalit_sse2.o : sse2/xalit_sse2.c
+	$(COMPILE) -c sse2/xalit_sse2.c
+
+heuristic_sse41.o : sse41/heuristic_sse41.c
+	$(COMPILE) @SIMD_SSE4_1_CFLAGS@ -c sse41/heuristic_sse41.c
+xali1_sse41.o : sse41/xali1_sse41.c
+	$(COMPILE) @SIMD_SSE4_1_CFLAGS@ -c sse41/xali1_sse41.c
+xalip_sse41.o : sse41/xalip_sse41.c
+	$(COMPILE) @SIMD_SSE4_1_CFLAGS@ -c sse41/xalip_sse41.c
+xalit_sse41.o : sse41/xalit_sse41.c
+	$(COMPILE) @SIMD_SSE4_1_CFLAGS@ -c sse41/xalit_sse41.c
diff --git a/src/C/Makefile.in b/src/C/Makefile.in
new file mode 100644
index 0000000..54a4883
--- /dev/null
+++ b/src/C/Makefile.in
@@ -0,0 +1,554 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ 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@
+bin_PROGRAMS = pfdump$(EXEEXT) pfsearchV3$(EXEEXT)
+subdir = src/C
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/C/include/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_pfdump_OBJECTS = pfdump-io.$(OBJEXT)
+pfdump_OBJECTS = $(am_pfdump_OBJECTS)
+pfdump_LDADD = $(LDADD)
+am_pfsearchV3_OBJECTS = pfsearchV3-pfsearch.$(OBJEXT)
+pfsearchV3_OBJECTS = $(am_pfsearchV3_OBJECTS)
+pfsearchV3_DEPENDENCIES = Normalization.o ReadSequence.o output.o io.o \
+	heuristic_sse2.o xali1_sse2.o xalip_sse2.o xalit_sse2.o \
+	heuristic_sse41.o xali1_sse41.o xalip_sse41.o xalit_sse41.o
+pfsearchV3_LINK = $(CCLD) $(pfsearchV3_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src/C/include
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(pfdump_SOURCES) $(pfsearchV3_SOURCES)
+DIST_SOURCES = $(pfdump_SOURCES) $(pfsearchV3_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+FPP_OPTION = @FPP_OPTION@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTEL_IMF = @INTEL_IMF@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SIMD_SSE2_CFLAGS = @SIMD_SSE2_CFLAGS@
+SIMD_SSE4_1_CFLAGS = @SIMD_SSE4_1_CFLAGS@
+STRIP = @STRIP@
+USE_AFFINITY = @USE_AFFINITY@
+USE_MMAP = @USE_MMAP@
+VERSION = @VERSION@
+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_F77 = @ac_ct_F77@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AM_CFLAGS = -O3
+pfdump_SOURCES = utils/io.c
+pfdump_CPPFLAGS = -D_TEST 
+pfsearchV3_SOURCES = prg/pfsearch.c
+pfsearchV3_LDADD = Normalization.o ReadSequence.o output.o io.o \
+		   heuristic_sse2.o xali1_sse2.o xalip_sse2.o xalit_sse2.o \
+		   heuristic_sse41.o xali1_sse41.o xalip_sse41.o xalit_sse41.o \
+		   @INTEL_IMF@ -lm
+
+pfsearchV3_CPPFLAGS = @USE_MMAP@ @USE_AFFINITY@
+pfsearchV3_CFLAGS = -O3 @PTHREAD_CFLAGS@
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/C/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/C/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	      echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	      $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+pfdump$(EXEEXT): $(pfdump_OBJECTS) $(pfdump_DEPENDENCIES) 
+	@rm -f pfdump$(EXEEXT)
+	$(LINK) $(pfdump_OBJECTS) $(pfdump_LDADD) $(LIBS)
+pfsearchV3$(EXEEXT): $(pfsearchV3_OBJECTS) $(pfsearchV3_DEPENDENCIES) 
+	@rm -f pfsearchV3$(EXEEXT)
+	$(pfsearchV3_LINK) $(pfsearchV3_OBJECTS) $(pfsearchV3_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pfdump-io.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pfsearchV3-pfsearch.Po at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+pfdump-io.o: utils/io.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pfdump_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pfdump-io.o -MD -MP -MF $(DEPDIR)/pfdump-io.Tpo -c -o pfdump-io.o `test -f 'utils/io.c' || echo '$(srcdir)/'`utils/io.c
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/pfdump-io.Tpo $(DEPDIR)/pfdump-io.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='utils/io.c' object='pfdump-io.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pfdump_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pfdump-io.o `test -f 'utils/io.c' || echo '$(srcdir)/'`utils/io.c
+
+pfdump-io.obj: utils/io.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pfdump_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pfdump-io.obj -MD -MP -MF $(DEPDIR)/pfdump-io.Tpo -c -o pfdump-io.obj `if test -f 'utils/io.c'; then $(CYGPATH_W) 'utils/io.c'; else $(CYGPATH_W) '$(srcdir)/utils/io.c'; fi`
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/pfdump-io.Tpo $(DEPDIR)/pfdump-io.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='utils/io.c' object='pfdump-io.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pfdump_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pfdump-io.obj `if test -f 'utils/io.c'; then $(CYGPATH_W) 'utils/io.c'; else $(CYGPATH_W) '$(srcdir)/utils/io.c'; fi`
+
+pfsearchV3-pfsearch.o: prg/pfsearch.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pfsearchV3_CPPFLAGS) $(CPPFLAGS) $(pfsearchV3_CFLAGS) $(CFLAGS) -MT pfsearchV3-pfsearch.o -MD -MP -MF $(DEPDIR)/pfsearchV3-pfsearch.Tpo -c -o pfsearchV3-pfsearch.o `test -f 'prg/pfsearch.c' || echo '$(srcdir)/'`prg/pfsearch.c
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/pfsearchV3-pfsearch.Tpo $(DEPDIR)/pfsearchV3-pfsearch.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='prg/pfsearch.c' object='pfsearchV3-pfsearch.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pfsearchV3_CPPFLAGS) $(CPPFLAGS) $(pfsearchV3_CFLAGS) $(CFLAGS) -c -o pfsearchV3-pfsearch.o `test -f 'prg/pfsearch.c' || echo '$(srcdir)/'`prg/pfsearch.c
+
+pfsearchV3-pfsearch.obj: prg/pfsearch.c
+ at am__fastdepCC_TRUE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pfsearchV3_CPPFLAGS) $(CPPFLAGS) $(pfsearchV3_CFLAGS) $(CFLAGS) -MT pfsearchV3-pfsearch.obj -MD -MP -MF $(DEPDIR)/pfsearchV3-pfsearch.Tpo -c -o pfsearchV3-pfsearch.obj `if test -f 'prg/pfsearch.c'; then $(CYGPATH_W) 'prg/pfsearch.c'; else $(CYGPATH_W) '$(srcdir)/prg/pfsearch.c'; fi`
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/pfsearchV3-pfsearch.Tpo $(DEPDIR)/pfsearchV3-pfsearch.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='prg/pfsearch.c' object='pfsearchV3-pfsearch.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(pfsearchV3_CPPFLAGS) $(CPPFLAGS) $(pfsearchV3_CFLAGS) $(CFLAGS) -c -o pfsearchV3-pfsearch.obj `if test -f 'prg/pfsearch.c'; then $(CYGPATH_W) 'prg/pfsearch.c'; else $(CYGPATH_W) '$(srcdir)/prg/pfsearch.c'; 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)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-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:
+
+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
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic ctags distclean distclean-compile \
+	distclean-generic distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-binPROGRAMS \
+	install-data install-data-am install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-info install-info-am install-man install-pdf \
+	install-pdf-am install-ps install-ps-am install-strip \
+	installcheck installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-binPROGRAMS
+
+
+io.o : utils/io.c
+	$(COMPILE) -c utils/io.c
+Normalization.o : utils/Normalization.c
+	$(COMPILE) -c utils/Normalization.c
+ReadSequence.o : utils/ReadSequence.c
+	$(COMPILE) -c utils/ReadSequence.c
+output.o : utils/output.c
+	$(COMPILE) -c utils/output.c
+
+heuristic_sse2.o : sse2/heuristic_sse2.c
+	$(COMPILE) -c sse2/heuristic_sse2.c
+xali1_sse2.o : sse2/xali1_sse2.c
+	$(COMPILE) -c sse2/xali1_sse2.c
+xalip_sse2.o : sse2/xalip_sse2.c
+	$(COMPILE) -c sse2/xalip_sse2.c
+xalit_sse2.o : sse2/xalit_sse2.c
+	$(COMPILE) -c sse2/xalit_sse2.c
+
+heuristic_sse41.o : sse41/heuristic_sse41.c
+	$(COMPILE) @SIMD_SSE4_1_CFLAGS@ -c sse41/heuristic_sse41.c
+xali1_sse41.o : sse41/xali1_sse41.c
+	$(COMPILE) @SIMD_SSE4_1_CFLAGS@ -c sse41/xali1_sse41.c
+xalip_sse41.o : sse41/xalip_sse41.c
+	$(COMPILE) @SIMD_SSE4_1_CFLAGS@ -c sse41/xalip_sse41.c
+xalit_sse41.o : sse41/xalit_sse41.c
+	$(COMPILE) @SIMD_SSE4_1_CFLAGS@ -c sse41/xalit_sse41.c
+
+# 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/C/a.out b/src/C/a.out
new file mode 100755
index 0000000..5597b90
Binary files /dev/null and b/src/C/a.out differ
diff --git a/src/C/generic/heuristic.c b/src/C/generic/heuristic.c
new file mode 100644
index 0000000..7bd28c6
--- /dev/null
+++ b/src/C/generic/heuristic.c
@@ -0,0 +1,747 @@
+/*******************************************************
+                        PFTOOLS
+ *******************************************************
+  Sep 30, 2011 heuristic.c
+ *******************************************************
+ (C) 2011 Swiss Institute of Bioinformatics
+     Thierry Schuepbach (thierry.schuepbach at isb-sib.ch)
+ *******************************************************/
+#include <stdlib.h>
+#include <stdio.h>
+#include <inttypes.h>
+#include <stdbool.h>
+#include <mmintrin.h>
+#include <emmintrin.h>
+#include <xmmintrin.h>
+#ifdef __SSE_4_1__
+# include <smmintrin.h>
+#endif
+#include <alloca.h>
+#include "profile.h"
+
+#if 0
+unsigned int heuristic(const struct Profile * const restrict prf, const PFSequence * const restrict Sequence,
+                       const unsigned int CutOff)
+{
+  unsigned int Score = 0;
+//   printf("Sequence length: %li\n", Sequence->Length);
+  // Allocate vectors on the stack ( one for read, one for write )
+  int * restrict v0 = (int *) ( ( (uintptr_t) alloca(Sequence->Length*sizeof(int) + 63)) & ~63);
+  int * restrict v1 = (int *) ( ( (uintptr_t) alloca(Sequence->Length*sizeof(int) + 63)) & ~63);
+
+  __assume_aligned(v0,64);
+  __assume_aligned(v1,64);
+  
+  register int * restrict v_w = v0;
+ 
+  // Initialize v with first profile
+  register const short int * restrict Match = prf->Scores.Match.Alphabet;
+  for (int iseq=0; iseq<Sequence->Length; ++iseq) {
+//     printf("%i %i\n", iseq, (int) Sequence->ProfileIndex[iseq]);
+    register const int Index = (int) Sequence->ProfileIndex[iseq];
+    const int tmp = (int) Match[Index];
+    v_w[iseq] = tmp > 0 ? tmp : 0;
+    Score = tmp > Score ? tmp : Score;
+  }
+
+  // Block size for alphabet
+  const register size_t AlignStep = prf->Scores.Match.AlignStep;
+
+  // Set read v pointer
+  register const int * restrict v_r = v0;
+  v_w = v1;
+  
+  // Run through the rest of the profile
+  for (int iprf=1; iprf<prf->Length; ++iprf) {
+    // Move to next profile Match alphabet
+    Match += AlignStep;
+
+    register int Index0 = (int) Sequence->ProfileIndex[0];
+    register const int Match0 = (int) Match[Index0];
+    v_w[0] = Match0;
+    register unsigned int max = Match0 > 0 ? Match0 : 0;
+#pragma unroll(4)
+    for (int iseq=1; iseq<Sequence->Length; ++iseq) {
+      register const int Index = (int) Sequence->ProfileIndex[iseq];
+      register int tmp   = v_r[iseq-1] + (int) Match[Index];
+      tmp = tmp > 0 ? tmp : 0;
+      v_w[iseq] = tmp;
+      if ((unsigned int) tmp > max) max = tmp;
+    }
+    
+    // Swap pointers
+    int * ptr = v_w;
+    v_w = (int*) v_r;
+    v_r = (const int*) ptr;
+
+    // Update Score
+    Score += max;
+    if (Score >= CutOff) return Score;
+  }
+
+  return Score;
+}
+#endif
+#ifdef __SSE4_1__
+unsigned int TransposeHeuristic_sse41(const int * const restrict TransposeMatch, const size_t Alphabet_Length,
+                                const size_t Profile_Length, const PFSequence * const restrict Sequence)
+// WARNING: Creation of the transpose matrix took care of zeroing extra data on cache line.
+//          Remember that if you happen to change the code.
+{
+  unsigned int Score = 0;
+  size_t iprf;
+  // Allocate vectors on the stack ( one for read, one for write )
+  const size_t Aligned_Profile_Length = (Profile_Length+1 + 15) & ~15;
+  int * restrict v0 = (int *) ( ( (uintptr_t) alloca(Aligned_Profile_Length*sizeof(int) + 63)) & ~63);
+  int * restrict v1 = (int *) ( ( (uintptr_t) alloca(Aligned_Profile_Length*sizeof(int) + 63)) & ~63);
+  int * restrict Sc = (int *) ( ( (uintptr_t) alloca(Aligned_Profile_Length*sizeof(int) + 63)) & ~63);
+  
+  register int * restrict v_w = v0;
+
+  // Initialize v with first sequence
+  register size_t Index = (size_t) Sequence->ProfileIndex[0];
+  register const int * restrict lMatch = &TransposeMatch[Aligned_Profile_Length*Index];
+
+#if 0   
+  for ( iprf=0; iprf<Profile_Length; ++iprf) {
+    v_w[iprf] = lMatch[iprf];
+    Sc[iprf]  = lMatch[iprf] > 0 ? lMatch[iprf] : 0;
+  }
+  for ( iprf=Profile_Length; iprf<Aligned_Profile_Length; ++iprf) {
+    Sc[iprf] = 0;
+  }
+#else
+
+  iprf = 0;
+  do {
+    __m128i __m1  = _mm_load_si128((__m128i*)&lMatch[iprf]);
+    __m128i __m2  = _mm_load_si128((__m128i*)&lMatch[iprf+4]);
+    __m128i __m3  = _mm_load_si128((__m128i*)&lMatch[iprf+8]);
+    __m128i __m4  = _mm_load_si128((__m128i*)&lMatch[iprf+12]);
+    __m128i __sc1 = _mm_max_epi32(_mm_setzero_si128(), __m1);
+    _mm_store_si128((__m128i*)&v_w[iprf], __m1);
+    __m128i __sc2 = _mm_max_epi32(_mm_setzero_si128(), __m2);
+    _mm_store_si128((__m128i*)&v_w[iprf+4], __m1);
+    __m128i __sc3 = _mm_max_epi32(_mm_setzero_si128(), __m3);
+    _mm_store_si128((__m128i*)&v_w[iprf+8], __m1);
+    __m128i __sc4 = _mm_max_epi32(_mm_setzero_si128(), __m4);
+    _mm_store_si128((__m128i*)&v_w[iprf+12], __m1);
+    _mm_store_si128((__m128i*)&Sc[iprf   ], __sc1);
+    _mm_store_si128((__m128i*)&Sc[iprf+4 ], __sc2);
+    _mm_store_si128((__m128i*)&Sc[iprf+8 ], __sc3);
+    _mm_store_si128((__m128i*)&Sc[iprf+12], __sc4);
+    iprf += 16;
+  } while (iprf < Profile_Length);
+  while (iprf < Aligned_Profile_Length) {
+    _mm_store_si128((__m128i*)&Sc[iprf   ], _mm_setzero_si128());
+    _mm_store_si128((__m128i*)&Sc[iprf+4 ], _mm_setzero_si128());
+    _mm_store_si128((__m128i*)&Sc[iprf+8 ], _mm_setzero_si128());
+    _mm_store_si128((__m128i*)&Sc[iprf+12], _mm_setzero_si128());
+    iprf += 16;
+  }
+#endif
+  // Set read v pointer
+  register const int * v_r = v0;
+  v_w = v1;
+
+  // Run through the rest of the profile
+  for (unsigned int iseq=1; iseq<(unsigned int) Sequence->Length; ++iseq) {
+    Index = (size_t) Sequence->ProfileIndex[iseq];
+    lMatch = &TransposeMatch[Aligned_Profile_Length*Index];
+    
+#if 0
+    v_w[0] = lMatch[0] > 0 ? lMatch[0] : 0;
+    if (lMatch[0] > Sc[0] ) Sc[0] = lMatch[0];
+   
+    for (size_t iprf=1; iprf<Profile_Length; ++iprf) {
+      register int tmp   = v_r[iprf-1] + lMatch[iprf];
+      tmp = tmp > 0 ? tmp : 0;
+      v_w[iprf] = tmp;
+
+      if (tmp > Sc[iprf]) Sc[iprf] = tmp;
+    }
+#else
+    
+    __m128i __V_R_0 = _mm_load_si128((__m128i*) &v_r[0]);
+    __V_R_0         = _mm_slli_si128(__V_R_0, 4); 
+
+    iprf=0;
+    goto Insert;
+    
+    Loop:
+      __V_R_0                  = _mm_loadu_si128((__m128i*) &v_r[iprf-1]);
+      
+    Insert:
+    ;
+      const __m128i __lMatch_0 = _mm_load_si128((__m128i*)&lMatch[iprf]);
+      __V_R_0                  = _mm_add_epi32(__V_R_0, __lMatch_0); 
+      
+      __m128i __V_R_1          = _mm_loadu_si128((__m128i*)&v_r[iprf-1 + 4]);
+      const __m128i __lMatch_1 = _mm_load_si128((__m128i*)&lMatch[iprf + 4]);
+      __V_R_1                  = _mm_add_epi32(__V_R_1, __lMatch_1);
+      
+      __m128i __V_R_2          = _mm_loadu_si128((__m128i*)&v_r[iprf-1 + 8]);
+      const __m128i __lMatch_2 = _mm_load_si128((__m128i*)&lMatch[iprf + 8]);
+      __V_R_2                  = _mm_add_epi32(__V_R_2, __lMatch_2); 
+      
+      __m128i __V_R_3          = _mm_loadu_si128((__m128i*)&v_r[iprf-1 + 12]);
+      const __m128i __lMatch_3 = _mm_load_si128((__m128i*)&lMatch[iprf + 12]);
+      __V_R_3                  = _mm_add_epi32(__V_R_3, __lMatch_3);
+      
+      __m128i __SC_0           = _mm_load_si128((__m128i*)&Sc[iprf]);
+      __V_R_0                  = _mm_max_epi32( (__m128i) _mm_setzero_si128(), __V_R_0);
+      
+      __m128i __SC_1           = _mm_load_si128((__m128i*)&Sc[iprf + 4]);
+      __V_R_1                  = _mm_max_epi32( (__m128i) _mm_setzero_si128(), __V_R_1);
+      
+      __m128i __SC_2           = _mm_load_si128((__m128i*)&Sc[iprf + 8]);
+      __V_R_2                  = _mm_max_epi32( (__m128i) _mm_setzero_si128(), __V_R_2);
+      
+      __m128i __SC_3           = _mm_load_si128((__m128i*)&Sc[iprf + 12]);
+      __V_R_3                  = _mm_max_epi32( (__m128i) _mm_setzero_si128(), __V_R_3);
+      
+      _mm_store_si128((__m128i*)&v_w[iprf   ], __V_R_0);
+      _mm_store_si128((__m128i*)&v_w[iprf+4 ], __V_R_1);
+      _mm_store_si128((__m128i*)&v_w[iprf+8 ], __V_R_2);
+      _mm_store_si128((__m128i*)&v_w[iprf+12], __V_R_3);
+      
+      __SC_0 = _mm_max_epi32(__SC_0, __V_R_0);
+      __SC_1 = _mm_max_epi32(__SC_1, __V_R_1);
+      __SC_2 = _mm_max_epi32(__SC_2, __V_R_2);
+      __SC_3 = _mm_max_epi32(__SC_3, __V_R_3);
+      
+      _mm_store_si128((__m128i*)&Sc[iprf   ], __SC_0);
+      _mm_store_si128((__m128i*)&Sc[iprf+4 ], __SC_1);
+      _mm_store_si128((__m128i*)&Sc[iprf+8 ], __SC_2);
+      _mm_store_si128((__m128i*)&Sc[iprf+12], __SC_3);
+      iprf+= 16;
+    
+      if ( iprf<Profile_Length) goto Loop;
+
+#endif
+    
+    // Swap pointers
+    int * ptr = v_w;
+    v_w = (int*) v_r;
+    v_r = (const int*) ptr;
+
+    // Update Score
+    //Score += max;
+  }
+
+#if 1
+  #pragma unroll(16)
+  for (unsigned int iprf=0; iprf<(unsigned int)Profile_Length; ++iprf) 
+   Score += Sc[iprf];
+#else
+   // WARNING : THERE IS AN ERROR SOMEWHERE !!!
+  iprf = 0;
+  __m128i __s1 = _mm_setzero_si128();
+  __m128i __s2 = _mm_setzero_si128();
+  __m128i __s3 = _mm_setzero_si128();
+  __m128i __s4 = _mm_setzero_si128();
+  do {
+    __m128i __sc1 = _mm_load_si128((__m128i*)&Sc[iprf   ]);
+    __m128i __sc2 = _mm_load_si128((__m128i*)&Sc[iprf+ 4]);
+    __m128i __sc3 = _mm_load_si128((__m128i*)&Sc[iprf+ 8]);
+    __m128i __sc4 = _mm_load_si128((__m128i*)&Sc[iprf+12]);
+    __s1 = _mm_add_epi32(__s1, __sc1);
+    __s2 = _mm_add_epi32(__s2, __sc2);
+    __s3 = _mm_add_epi32(__s3, __sc3);
+    __s4 = _mm_add_epi32(__s4, __sc4);
+    iprf +=16;
+  } while (iprf < Profile_Length);
+  
+  __s1 = _mm_add_epi32(__s1, __s2);
+  __s3 = _mm_add_epi32(__s3, __s4);
+  __s1 = _mm_add_epi32(__s1, __s3);
+  
+  __asm__ __volatile__ ( "pshufd    $14, %1, %2 \n\t" 
+			 "paddd     %2, %1      \n\t"
+			 "pshufd    $57, %1, %3 \n\t"
+			 "paddd     %3, %1      \n\t"
+			 "pextrd    $0, %1, %0  \n\t"
+			 : "=r"(Score)
+			 : "x"(__s1), "x"(__s2), "x"(__s3)
+	  );
+#endif
+  
+  return Score;
+  
+}
+
+unsigned int TransposeHeuristicGivenMemory_sse41(const int * const restrict TransposeMatch, int * const Memory,
+						 const size_t Alphabet_Length, const size_t Profile_Length,
+						 const PFSequence * const restrict Sequence)
+// WARNING: Creation of the transpose matrix took care of zeroing extra data on cache line.
+//          Remember that if you happen to change the code.
+{
+  unsigned int Score = 0;
+  size_t iprf;
+  // Allocate vectors on the stack ( one for read, one for write )
+  const size_t Aligned_Profile_Length = (Profile_Length+1 + 15) & ~15;
+  int * restrict v0 = Memory;
+  int * restrict v1 = Memory + Aligned_Profile_Length;
+  int * restrict Sc = Memory + 2*Aligned_Profile_Length;
+  
+  register int * restrict v_w = v0;
+
+  // Initialize v with first sequence
+  register size_t Index = (size_t) Sequence->ProfileIndex[0];
+  register const int * restrict lMatch = &TransposeMatch[Aligned_Profile_Length*Index];
+
+#if 0   
+  for ( iprf=0; iprf<Profile_Length; ++iprf) {
+    v_w[iprf] = lMatch[iprf];
+    Sc[iprf]  = lMatch[iprf] > 0 ? lMatch[iprf] : 0;
+  }
+  for ( iprf=Profile_Length; iprf<Aligned_Profile_Length; ++iprf) {
+    Sc[iprf] = 0;
+  }
+#else
+
+  iprf = 0;
+  do {
+    __m128i __m1  = _mm_load_si128((__m128i*)&lMatch[iprf]);
+    __m128i __m2  = _mm_load_si128((__m128i*)&lMatch[iprf+4]);
+    __m128i __m3  = _mm_load_si128((__m128i*)&lMatch[iprf+8]);
+    __m128i __m4  = _mm_load_si128((__m128i*)&lMatch[iprf+12]);
+    __m128i __sc1 = _mm_max_epi32(_mm_setzero_si128(), __m1);
+    _mm_store_si128((__m128i*)&v_w[iprf], __m1);
+    __m128i __sc2 = _mm_max_epi32(_mm_setzero_si128(), __m2);
+    _mm_store_si128((__m128i*)&v_w[iprf+4], __m1);
+    __m128i __sc3 = _mm_max_epi32(_mm_setzero_si128(), __m3);
+    _mm_store_si128((__m128i*)&v_w[iprf+8], __m1);
+    __m128i __sc4 = _mm_max_epi32(_mm_setzero_si128(), __m4);
+    _mm_store_si128((__m128i*)&v_w[iprf+12], __m1);
+    _mm_store_si128((__m128i*)&Sc[iprf   ], __sc1);
+    _mm_store_si128((__m128i*)&Sc[iprf+4 ], __sc2);
+    _mm_store_si128((__m128i*)&Sc[iprf+8 ], __sc3);
+    _mm_store_si128((__m128i*)&Sc[iprf+12], __sc4);
+    iprf += 16;
+  } while (iprf < Profile_Length);
+  while (iprf < Aligned_Profile_Length) {
+    _mm_store_si128((__m128i*)&Sc[iprf   ], _mm_setzero_si128());
+    _mm_store_si128((__m128i*)&Sc[iprf+4 ], _mm_setzero_si128());
+    _mm_store_si128((__m128i*)&Sc[iprf+8 ], _mm_setzero_si128());
+    _mm_store_si128((__m128i*)&Sc[iprf+12], _mm_setzero_si128());
+    iprf += 16;
+  }
+#endif
+  // Set read v pointer
+  register const int * v_r = v0;
+  v_w = v1;
+
+  // Run through the rest of the profile
+  for (unsigned int iseq=1; iseq<(unsigned int) Sequence->Length; ++iseq) {
+    Index = (size_t) Sequence->ProfileIndex[iseq];
+    lMatch = &TransposeMatch[Aligned_Profile_Length*Index];
+    
+#if 0
+    v_w[0] = lMatch[0] > 0 ? lMatch[0] : 0;
+    if (lMatch[0] > Sc[0] ) Sc[0] = lMatch[0];
+   
+    for (size_t iprf=1; iprf<Profile_Length; ++iprf) {
+      register int tmp   = v_r[iprf-1] + lMatch[iprf];
+      tmp = tmp > 0 ? tmp : 0;
+      v_w[iprf] = tmp;
+
+      if (tmp > Sc[iprf]) Sc[iprf] = tmp;
+    }
+#else
+    
+    __m128i __V_R_0 = _mm_load_si128((__m128i*) &v_r[0]);
+    __V_R_0         = _mm_slli_si128(__V_R_0, 4); 
+
+    iprf=0;
+    goto Insert;
+    
+    Loop:
+      __V_R_0                  = _mm_loadu_si128((__m128i*) &v_r[iprf-1]);
+      
+    Insert:
+    ;
+      const __m128i __lMatch_0 = _mm_load_si128((__m128i*)&lMatch[iprf]);
+      __V_R_0                  = _mm_add_epi32(__V_R_0, __lMatch_0); 
+      
+      __m128i __V_R_1          = _mm_loadu_si128((__m128i*)&v_r[iprf-1 + 4]);
+      const __m128i __lMatch_1 = _mm_load_si128((__m128i*)&lMatch[iprf + 4]);
+      __V_R_1                  = _mm_add_epi32(__V_R_1, __lMatch_1);
+      
+      __m128i __V_R_2          = _mm_loadu_si128((__m128i*)&v_r[iprf-1 + 8]);
+      const __m128i __lMatch_2 = _mm_load_si128((__m128i*)&lMatch[iprf + 8]);
+      __V_R_2                  = _mm_add_epi32(__V_R_2, __lMatch_2); 
+      
+      __m128i __V_R_3          = _mm_loadu_si128((__m128i*)&v_r[iprf-1 + 12]);
+      const __m128i __lMatch_3 = _mm_load_si128((__m128i*)&lMatch[iprf + 12]);
+      __V_R_3                  = _mm_add_epi32(__V_R_3, __lMatch_3);
+      
+      __m128i __SC_0           = _mm_load_si128((__m128i*)&Sc[iprf]);
+      __V_R_0                  = _mm_max_epi32( (__m128i) _mm_setzero_si128(), __V_R_0);
+      
+      __m128i __SC_1           = _mm_load_si128((__m128i*)&Sc[iprf + 4]);
+      __V_R_1                  = _mm_max_epi32( (__m128i) _mm_setzero_si128(), __V_R_1);
+      
+      __m128i __SC_2           = _mm_load_si128((__m128i*)&Sc[iprf + 8]);
+      __V_R_2                  = _mm_max_epi32( (__m128i) _mm_setzero_si128(), __V_R_2);
+      
+      __m128i __SC_3           = _mm_load_si128((__m128i*)&Sc[iprf + 12]);
+      __V_R_3                  = _mm_max_epi32( (__m128i) _mm_setzero_si128(), __V_R_3);
+      
+      _mm_store_si128((__m128i*)&v_w[iprf   ], __V_R_0);
+      _mm_store_si128((__m128i*)&v_w[iprf+4 ], __V_R_1);
+      _mm_store_si128((__m128i*)&v_w[iprf+8 ], __V_R_2);
+      _mm_store_si128((__m128i*)&v_w[iprf+12], __V_R_3);
+      
+      __SC_0 = _mm_max_epi32(__SC_0, __V_R_0);
+      __SC_1 = _mm_max_epi32(__SC_1, __V_R_1);
+      __SC_2 = _mm_max_epi32(__SC_2, __V_R_2);
+      __SC_3 = _mm_max_epi32(__SC_3, __V_R_3);
+      
+      _mm_store_si128((__m128i*)&Sc[iprf   ], __SC_0);
+      _mm_store_si128((__m128i*)&Sc[iprf+4 ], __SC_1);
+      _mm_store_si128((__m128i*)&Sc[iprf+8 ], __SC_2);
+      _mm_store_si128((__m128i*)&Sc[iprf+12], __SC_3);
+      iprf+= 16;
+    
+      if ( iprf<Profile_Length) goto Loop;
+
+#endif
+    
+    // Swap pointers
+    int * ptr = v_w;
+    v_w = (int*) v_r;
+    v_r = (const int*) ptr;
+
+    // Update Score
+    //Score += max;
+  }
+
+#if 1
+  #pragma unroll(4)
+  for (iprf=0; iprf<Profile_Length; ++iprf) 
+   Score += Sc[iprf];
+#else
+   // WARNING : THERE IS AN ERROR SOMEWHERE !!!
+  iprf = 0;
+  __m128i __s1 = _mm_setzero_si128();
+  __m128i __s2 = _mm_setzero_si128();
+  __m128i __s3 = _mm_setzero_si128();
+  __m128i __s4 = _mm_setzero_si128();
+  do {
+    __m128i __sc1 = _mm_load_si128((__m128i*)&Sc[iprf   ]);
+    __m128i __sc2 = _mm_load_si128((__m128i*)&Sc[iprf+ 4]);
+    __m128i __sc3 = _mm_load_si128((__m128i*)&Sc[iprf+ 8]);
+    __m128i __sc4 = _mm_load_si128((__m128i*)&Sc[iprf+12]);
+    __s1 = _mm_add_epi32(__s1, __sc1);
+    __s2 = _mm_add_epi32(__s2, __sc2);
+    __s3 = _mm_add_epi32(__s3, __sc3);
+    __s4 = _mm_add_epi32(__s4, __sc4);
+    iprf +=16;
+  } while (iprf < Profile_Length);
+  
+  __s1 = _mm_add_epi32(__s1, __s2);
+  __s3 = _mm_add_epi32(__s3, __s4);
+  __s1 = _mm_add_epi32(__s1, __s3);
+  
+  __asm__ __volatile__ ( "pshufd    $14, %1, %2 \n\t" 
+			 "paddd     %2, %1      \n\t"
+			 "pshufd    $57, %1, %3 \n\t"
+			 "paddd     %3, %1      \n\t"
+			 "pextrd    $0, %1, %0  \n\t"
+			 : "=r"(Score)
+			 : "x"(__s1), "x"(__s2), "x"(__s3)
+	  );
+#endif
+  
+  return Score;
+  
+}
+#endif
+
+float TransposeHeuristic_sse2(const float * const restrict TransposeMatch, const size_t Alphabet_Length,
+	                      const size_t Profile_Length, const PFSequence * const restrict Sequence)
+{
+  size_t iprf;
+  float Score = 0.0f;
+  // Allocate vectors on the stack ( one for read, one for write )
+  const size_t Aligned_Profile_Length = (Profile_Length+1 + 15) & ~15;
+  float * restrict v0 = (float *) ( ( (uintptr_t) alloca(Aligned_Profile_Length*sizeof(float) + 63)) & ~63);
+  float * restrict v1 = (float *) ( ( (uintptr_t) alloca(Aligned_Profile_Length*sizeof(float) + 63)) & ~63);
+  float * restrict Sc = (float *) ( ( (uintptr_t) alloca(Aligned_Profile_Length*sizeof(float) + 63)) & ~63);
+  
+  register float * restrict v_w = v0;
+
+  // Initialize v with first sequence
+  register size_t Index = (size_t) Sequence->ProfileIndex[0];
+  register const float * restrict lMatch = &TransposeMatch[Aligned_Profile_Length*Index];
+  
+  iprf = 0;
+  const __m128 __Zero = _mm_setzero_ps();
+  do {
+    __m128 __m1  = _mm_load_ps(&lMatch[iprf]);
+    __m128 __m2  = _mm_load_ps(&lMatch[iprf+4]);
+    __m128 __m3  = _mm_load_ps(&lMatch[iprf+8]);
+    __m128 __m4  = _mm_load_ps(&lMatch[iprf+12]);
+    __m128 __sc1 = _mm_max_ps(__Zero, __m1);
+    _mm_store_ps(&v_w[iprf], __m1);
+    __m128 __sc2 = _mm_max_ps(__Zero, __m2);
+    _mm_store_ps(&v_w[iprf+4], __m1);
+    __m128 __sc3 = _mm_max_ps(__Zero, __m3);
+    _mm_store_ps(&v_w[iprf+8], __m1);
+    __m128 __sc4 = _mm_max_ps(__Zero, __m4);
+    _mm_store_ps(&v_w[iprf+12], __m1);
+    _mm_store_ps(&Sc[iprf   ], __sc1);
+    _mm_store_ps(&Sc[iprf+4 ], __sc2);
+    _mm_store_ps(&Sc[iprf+8 ], __sc3);
+    _mm_store_ps(&Sc[iprf+12], __sc4);
+    iprf += 16;
+  } while (iprf < Profile_Length);
+  while (iprf < Aligned_Profile_Length) {
+    _mm_store_ps(&Sc[iprf   ], __Zero);
+    _mm_store_ps(&Sc[iprf+4 ], __Zero);
+    _mm_store_ps(&Sc[iprf+8 ], __Zero);
+    _mm_store_ps(&Sc[iprf+12], __Zero);
+    iprf += 16;
+  }
+
+  // Set read v pointer
+  register const float * v_r = v0;
+  v_w = v1;
+
+  // Run through the rest of the profile
+  for (unsigned int iseq=1; iseq<(unsigned int) Sequence->Length; ++iseq) {
+    Index = (size_t) Sequence->ProfileIndex[iseq];
+    lMatch = &TransposeMatch[Aligned_Profile_Length*Index];
+#if 0
+    v_w[0] = lMatch[0] > 0.0f ? lMatch[0] : 0.0f;
+    if (lMatch[0] > Sc[0] ) Sc[0] = lMatch[0];
+    
+    for (iprf=1; iprf<Profile_Length; ++iprf) {
+      float tmp   = v_r[iprf-1] + lMatch[iprf];
+      tmp = tmp > 0.0f ? tmp : 0.0f;
+      v_w[iprf] = tmp;
+
+      if (tmp > Sc[iprf]) Sc[iprf] = tmp;
+    }
+#else    
+    __m128 __V_R_0 = _mm_load_ps(&v_r[0]);
+    __V_R_0        = (__m128) _mm_slli_si128((__m128i) __V_R_0, 4); 
+
+    iprf=0;
+    goto Insert;
+    
+    Loop:
+      __V_R_0                  = _mm_loadu_ps(&v_r[iprf-1]);
+      
+    Insert:
+    ;
+      const __m128 __lMatch_0 = _mm_load_ps(&lMatch[iprf]);
+      __V_R_0                 = _mm_add_ps(__V_R_0, __lMatch_0); 
+      
+      __m128 __V_R_1          = _mm_loadu_ps(&v_r[iprf-1 + 4]);
+      const __m128 __lMatch_1 = _mm_load_ps(&lMatch[iprf + 4]);
+      __V_R_1                 = _mm_add_ps(__V_R_1, __lMatch_1);
+      
+      __m128 __V_R_2          = _mm_loadu_ps(&v_r[iprf-1 + 8]);
+      const __m128 __lMatch_2 = _mm_load_ps(&lMatch[iprf + 8]);
+      __V_R_2                 = _mm_add_ps(__V_R_2, __lMatch_2); 
+      
+      __m128 __V_R_3          = _mm_loadu_ps(&v_r[iprf-1 + 12]);
+      const __m128 __lMatch_3 = _mm_load_ps(&lMatch[iprf + 12]);
+      __V_R_3                 = _mm_add_ps(__V_R_3, __lMatch_3);
+      
+      __m128 __SC_0           = _mm_load_ps(&Sc[iprf]);
+      __V_R_0                 = _mm_max_ps( (__m128) __Zero, __V_R_0);
+      
+      __m128 __SC_1           = _mm_load_ps(&Sc[iprf + 4]);
+      __V_R_1                 = _mm_max_ps( (__m128) __Zero, __V_R_1);
+      
+      __m128 __SC_2           = _mm_load_ps(&Sc[iprf + 8]);
+      __V_R_2                 = _mm_max_ps( (__m128) __Zero, __V_R_2);
+      
+      __m128 __SC_3           = _mm_load_ps(&Sc[iprf + 12]);
+      __V_R_3                 = _mm_max_ps( (__m128) __Zero, __V_R_3);
+      
+      _mm_store_ps(&v_w[iprf   ], __V_R_0);
+      _mm_store_ps(&v_w[iprf+4 ], __V_R_1);
+      _mm_store_ps(&v_w[iprf+8 ], __V_R_2);
+      _mm_store_ps(&v_w[iprf+12], __V_R_3);
+      
+      __SC_0 = _mm_max_ps(__SC_0, __V_R_0);
+      __SC_1 = _mm_max_ps(__SC_1, __V_R_1);
+      __SC_2 = _mm_max_ps(__SC_2, __V_R_2);
+      __SC_3 = _mm_max_ps(__SC_3, __V_R_3);
+      
+      _mm_store_ps(&Sc[iprf   ], __SC_0);
+      _mm_store_ps(&Sc[iprf+4 ], __SC_1);
+      _mm_store_ps(&Sc[iprf+8 ], __SC_2);
+      _mm_store_ps(&Sc[iprf+12], __SC_3);
+      iprf+= 16;
+    
+      if ( iprf<Profile_Length) goto Loop;
+
+#endif
+    
+    // Swap pointers
+    float * ptr = v_w;
+    v_w = (float*) v_r;
+    v_r = (const float*) ptr;
+
+    // Update Score
+    //Score += max;
+  }
+
+  #pragma unroll(4)
+  for (iprf=0; iprf<Profile_Length; ++iprf) 
+   Score += Sc[iprf];
+  
+  return Score;
+}
+
+float TransposeHeuristicGivenMemory_sse2(const float * const restrict TransposeMatch, float * const Memory,
+					 const size_t Alphabet_Length, const size_t Profile_Length,
+					 const PFSequence * const restrict Sequence)
+{
+  size_t iprf;
+  float Score = 0.0f;
+  
+  const size_t Aligned_Profile_Length = (Profile_Length+1 + 15) & ~15;
+  float * restrict v0 = Memory;
+  float * restrict v1 = Memory + Aligned_Profile_Length;
+  float * restrict Sc = Memory + 2*Aligned_Profile_Length;
+  
+  register float * restrict v_w = v0;
+
+  // Initialize v with first sequence
+  register size_t Index = (size_t) Sequence->ProfileIndex[0];
+  register const float * restrict lMatch = &TransposeMatch[Aligned_Profile_Length*Index];
+  
+  const __m128 __Zero = _mm_setzero_ps();
+  iprf = 0;
+  do {
+    __m128 __m1  = _mm_load_ps(&lMatch[iprf]);
+    __m128 __m2  = _mm_load_ps(&lMatch[iprf+4]);
+    __m128 __m3  = _mm_load_ps(&lMatch[iprf+8]);
+    __m128 __m4  = _mm_load_ps(&lMatch[iprf+12]);
+    __m128 __sc1 = _mm_max_ps(__Zero, __m1);
+    _mm_store_ps(&v_w[iprf], __m1);
+    __m128 __sc2 = _mm_max_ps(__Zero, __m2);
+    _mm_store_ps(&v_w[iprf+4], __m1);
+    __m128 __sc3 = _mm_max_ps(__Zero, __m3);
+    _mm_store_ps(&v_w[iprf+8], __m1);
+    __m128 __sc4 = _mm_max_ps(__Zero, __m4);
+    _mm_store_ps(&v_w[iprf+12], __m1);
+    _mm_store_ps(&Sc[iprf   ], __sc1);
+    _mm_store_ps(&Sc[iprf+4 ], __sc2);
+    _mm_store_ps(&Sc[iprf+8 ], __sc3);
+    _mm_store_ps(&Sc[iprf+12], __sc4);
+    iprf += 16;
+  } while (iprf < Profile_Length);
+  while (iprf < Aligned_Profile_Length) {
+    _mm_store_ps(&Sc[iprf   ], __Zero);
+    _mm_store_ps(&Sc[iprf+4 ], __Zero);
+    _mm_store_ps(&Sc[iprf+8 ], __Zero);
+    _mm_store_ps(&Sc[iprf+12], __Zero);
+    iprf += 16;
+  }
+
+  // Set read v pointer
+  register const float * v_r = v0;
+  v_w = v1;
+
+  // Run through the rest of the profile
+  for (unsigned int iseq=1; iseq<(unsigned int) Sequence->Length; ++iseq) {
+    Index = (size_t) Sequence->ProfileIndex[iseq];
+    lMatch = &TransposeMatch[Aligned_Profile_Length*Index];
+#if 0
+    v_w[0] = lMatch[0] > 0.0f ? lMatch[0] : 0.0f;
+    if (lMatch[0] > Sc[0] ) Sc[0] = lMatch[0];
+   
+    __assume_aligned(lMatch, 16);
+    __assume_aligned(v_r, 16);
+    __assume_aligned(v_w, 16);
+    __assume_aligned(Sc, 16);
+ 
+    for (iprf=1; iprf<Profile_Length; ++iprf) {
+      float tmp   = v_r[iprf-1] + lMatch[iprf];
+      tmp = tmp > 0.0f ? tmp : 0.0f;
+      v_w[iprf] = tmp;
+
+      if (tmp > Sc[iprf]) Sc[iprf] = tmp;
+    }
+#else
+    
+    __m128 __V_R_0 = _mm_load_ps(&v_r[0]);
+    __V_R_0        = (__m128) _mm_slli_si128((__m128i) __V_R_0, 4); 
+
+    iprf=0;
+    goto Insert;
+    
+    Loop:
+      __V_R_0                  = _mm_loadu_ps(&v_r[iprf-1]);
+      
+    Insert:
+    ;
+      const __m128 __lMatch_0 = _mm_load_ps(&lMatch[iprf]);
+      __V_R_0                  = _mm_add_ps(__V_R_0, __lMatch_0); 
+      
+      __m128 __V_R_1          = _mm_loadu_ps(&v_r[iprf-1 + 4]);
+      const __m128 __lMatch_1 = _mm_load_ps(&lMatch[iprf + 4]);
+      __V_R_1                  = _mm_add_ps(__V_R_1, __lMatch_1);
+      
+      __m128 __V_R_2          = _mm_loadu_ps(&v_r[iprf-1 + 8]);
+      const __m128 __lMatch_2 = _mm_load_ps(&lMatch[iprf + 8]);
+      __V_R_2                  = _mm_add_ps(__V_R_2, __lMatch_2); 
+      
+      __m128 __V_R_3          = _mm_loadu_ps(&v_r[iprf-1 + 12]);
+      const __m128 __lMatch_3 = _mm_load_ps(&lMatch[iprf + 12]);
+      __V_R_3                  = _mm_add_ps(__V_R_3, __lMatch_3);
+      
+      __m128 __SC_0           = _mm_load_ps(&Sc[iprf]);
+      __V_R_0                  = _mm_max_ps( (__m128) __Zero, __V_R_0);
+      
+      __m128 __SC_1           = _mm_load_ps(&Sc[iprf + 4]);
+      __V_R_1                  = _mm_max_ps( (__m128) __Zero, __V_R_1);
+      
+      __m128 __SC_2           = _mm_load_ps(&Sc[iprf + 8]);
+      __V_R_2                  = _mm_max_ps( (__m128) __Zero, __V_R_2);
+      
+      __m128 __SC_3           = _mm_load_ps(&Sc[iprf + 12]);
+      __V_R_3                  = _mm_max_ps( (__m128) __Zero, __V_R_3);
+      
+      _mm_store_ps(&v_w[iprf   ], __V_R_0);
+      _mm_store_ps(&v_w[iprf+4 ], __V_R_1);
+      _mm_store_ps(&v_w[iprf+8 ], __V_R_2);
+      _mm_store_ps(&v_w[iprf+12], __V_R_3);
+      
+      __SC_0 = _mm_max_ps(__SC_0, __V_R_0);
+      __SC_1 = _mm_max_ps(__SC_1, __V_R_1);
+      __SC_2 = _mm_max_ps(__SC_2, __V_R_2);
+      __SC_3 = _mm_max_ps(__SC_3, __V_R_3);
+      
+      _mm_store_ps(&Sc[iprf   ], __SC_0);
+      _mm_store_ps(&Sc[iprf+4 ], __SC_1);
+      _mm_store_ps(&Sc[iprf+8 ], __SC_2);
+      _mm_store_ps(&Sc[iprf+12], __SC_3);
+      iprf+= 16;
+    
+      if ( iprf<Profile_Length) goto Loop;
+
+#endif
+    
+    // Swap pointers
+    float * ptr = v_w;
+    v_w = (float*) v_r;
+    v_r = (const float*) ptr;
+
+    // Update Score
+    //Score += max;
+  }
+
+  #pragma unroll(4)
+  for (iprf=0; iprf<Profile_Length; ++iprf) 
+   Score += Sc[iprf];
+   
+  return Score;
+}
diff --git a/src/C/generic/xali1_old.c b/src/C/generic/xali1_old.c
new file mode 100644
index 0000000..b2b183a
--- /dev/null
+++ b/src/C/generic/xali1_old.c
@@ -0,0 +1,410 @@
+/*******************************************************
+                        PFTOOLS
+ *******************************************************
+  Sep 26, 2011 xali1.c
+ *******************************************************
+ (C) 2011 Swiss Institute of Bioinformatics
+     Thierry Schuepbach (thierry.schuepbach at isb-sib.ch)
+ *******************************************************/
+#include <stdlib.h>
+#include <stdio.h>
+#include <inttypes.h>
+#include <stdbool.h>
+#include <mmintrin.h>
+#include <emmintrin.h>
+#include <xmmintrin.h>
+#include <smmintrin.h>
+#include "profile.h"
+
+#define MAX(a,b) (a>b) ? a : b
+#ifndef NEWCONV 
+static __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
+ _MM_CVTEPI16_EPI32(__m128i __X) {
+      // Convert signed WORD into signed DWORD
+      const __m128i __sign = _mm_cmpgt_epi16((__m128i) _mm_setzero_epi32(), __X);
+      // Interleave sign with data to produce a 128 bit (4 x DWORD)
+      return _mm_unpacklo_epi16 (__X, __sign);
+};
+#else
+static __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
+ _MM_CVTEPI16_EPI32(__m128i __X) {
+   return _mm_cvtepi16_epi32(__X);
+};
+#endif
+
+int xali1(const struct Profile * const restrict prf, const unsigned char * const restrict Sequence,
+          int * const WORK, const size_t BSEQ, const size_t LSEQ, const int CutOff, const _Bool LOPT)
+/*
+ * WARNING: for SSE version, WORK should be 4 times the (profile size + 1) + 63 to align to cache line
+ */
+{
+  int KOPD, lScore = (int) NLOW;
+#ifndef _SSE_4_1_
+  const int * restrict IOPM_R;
+  int * restrict IOPM_W = WORK;
+  const int * restrict IOPI_R;
+  int * restrict IOPI_W = &WORK[(prf->Length+1)];
+  
+//   register int * const restrict IOPM = WORK;
+//   register int * const restrict IOPI = &WORK[prf->Length+1];
+  
+#define IOPI_R(i) IOPI_R[i]
+#define IOPI_W(i) IOPI_W[i]
+#define IOPM_R(i) IOPM_R[i]
+#define IOPM_W(i) IOPM_W[i]
+#else
+  typedef struct { int M; int I; } sIOP;
+  const sIOP * restrict IOP_R;
+  sIOP * restrict IOP_W = (sIOP*) WORK;
+ 
+//   register sIOP * const restrict IOP = (sIOP*) WORK;
+#define IOPI_R(i) IOP_R[i].I
+#define IOPI_W(i) IOP_W[i].I
+#define IOPM_R(i) IOP_R[i].M
+#define IOPM_W(i) IOP_W[i].M
+#endif
+
+  register const short int (* const restrict Transitions)[INSERTION_TRANSITIONS_SIZE] = \
+  (short int (*const restrict)[INSERTION_TRANSITIONS_SIZE]) prf->Scores.Insertion.Transitions;
+  const short int * const restrict Match = prf->Scores.Match.Alphabet;
+  const short int * const restrict Insertion = prf->Scores.Insertion.Alphabet;
+  const size_t AlignStep = prf->Scores.Match.AlignStep;
+
+  /* NOTE: The following part could be replaced and performed only once for a profile as it
+   *       is profile dependent. Nevertheless it does a good job loading Match and Transition
+   *       matrices into the cache hierarchy.
+   */
+  {
+    register const short int * restrict lMatch = &Match[_D];
+#ifndef _SSE_4_1_
+    register const short int (* const restrict FirstSequenceProtein)[FIRST_SIZE] = prf->Scores.Insertion.FirstSequenceProtein;
+    IOPM_W[0] = (int) FirstSequenceProtein[0][_YM];
+    IOPI_W[0] = (int) FirstSequenceProtein[0][_YI];
+    KOPD      = (int) FirstSequenceProtein[0][_YD];
+
+    for (size_t iprf=1; iprf<=prf->Length; ++iprf) {
+      register const int KD = KOPD + (int) *lMatch;
+      lMatch += AlignStep;
+ 
+      IOPM_W[iprf] = MAX( KD + (int) Transitions[iprf][_DM], (int) FirstSequenceProtein[iprf][_YM] );
+      IOPI_W[iprf] = MAX( KD + (int) Transitions[iprf][_DI], (int) FirstSequenceProtein[iprf][_YI] );
+      KOPD         = MAX( KD + (int) Transitions[iprf][_DD], (int) FirstSequenceProtein[iprf][_YD] );
+    }  
+#else
+    register const short int (* restrict FirstSequenceProtein)[FIRST_SIZE] = prf->Scores.Insertion.FirstSequenceProtein;
+    IOP_W[0].M = (int) FirstSequenceProtein[0][_YM];
+    IOP_W[0].I = (int) FirstSequenceProtein[0][_YI];
+    KOPD       = (int) FirstSequenceProtein[0][_YD];
+    FirstSequenceProtein++;
+    register const short int (* restrict pTransitions)[INSERTION_TRANSITIONS_SIZE] = &Transitions[1];
+    register sIOP * restrict pIOP = &IOP_W[1];
+    register int Length = - (int) prf->Length;
+
+//     while (Length-- != 0) {
+    do {
+      register const int KD = KOPD + (int) *lMatch;
+      lMatch += AlignStep;
+      
+      // Transform KD into a vector
+      __m128i __KD = _mm_set1_epi32(KD);
+      // Load Transitions
+      __m128i __Transitions = _mm_loadl_epi64((__m128i*) &pTransitions[0][_DM]);
+      
+      // Convert signed WORD into signed DWORD
+      __Transitions = _MM_CVTEPI16_EPI32(__Transitions);
+      
+      // Add KD to Transitions
+      __Transitions = _mm_add_epi32(__Transitions, __KD);
+      
+      // Move to next profile transitions
+      pTransitions++;
+
+      // Load FirstSequenceProtein
+      __m128i __FirstSequenceProtein = _mm_loadl_epi64((__m128i*) &FirstSequenceProtein[0][_YM]);
+
+      // Convert signed WORD into signed DWORD
+      __FirstSequenceProtein = _MM_CVTEPI16_EPI32(__FirstSequenceProtein);
+
+      // Move to next profile First Sequence
+      FirstSequenceProtein++;
+      
+      // Get maximum ( this is SSE 4.1 )
+      __m128i __max = _mm_max_epi32(__Transitions, __FirstSequenceProtein);
+
+      // Store IOPI and IOPM
+      _mm_storel_pi( (__m64*) pIOP, (__m128) __max);
+      pIOP++;
+      
+      // Set KOPD ( this is SSE 4.1 )
+      KOPD = _mm_extract_epi32(__max, 2);
+
+      Length++;
+    } while (Length < 0);
+#endif
+  }
+#ifndef _PACKED_TRANSITIONS_
+  register const short int (* const restrict IntermediateSequenceProtein)[INTERMEDIATE_SIZE] = prf->Scores.Insertion.IntermediateSequenceProtein;
+#endif
+
+#ifndef _SSE_4_1_
+  // Swap and assign Read and write pointers
+  IOPM_R = IOPM_W;
+  IOPI_R = IOPI_W;
+  IOPM_W = ((uintptr_t) &WORK[2*(prf->Length+1)] + 63) & ~63;
+  IOPI_W = &IOPM_W[prf->Length+1];
+#else
+  // Swap and assign Read and write pointers
+  IOP_R = IOP_W;
+  IOP_W = (sIOP*) (((uintptr_t) &WORK[2*(prf->Length+1)] + 63) & ~63);
+#endif
+  for ( int iseq=BSEQ; iseq < LSEQ-1; ++iseq) {
+    register const int j1 = (int) Sequence[iseq];
+    int KOPM = IOPM_R(0);
+    register const short int * restrict lInsertion = Insertion;
+    {
+      register const int KI = IOPI_R(0) + lInsertion[j1];
+#ifndef _SSE_4_1_
+      IOPM_W(0) = MAX( KI + (int) Transitions[0][_IM] , (int) Transitions[0][_XM] );
+      IOPI_W(0) = MAX( KI + (int) Transitions[0][_II] , (int) Transitions[0][_XI] );
+      KOPD      = MAX( KI + (int) Transitions[0][_ID] , (int) Transitions[0][_XD] );
+  #ifndef _PACKED_TRANSITIONS_
+      lScore = MAX( KI + (int) IntermediateSequenceProtein[0][_IX] , lScore );
+  #else
+      lScore = MAX( KI + (int) Transitions[0][_IX] , lScore );
+  #endif
+#else
+  #ifndef _PACKED_TRANSITIONS_
+      lScore  = MAX( KI + (int) IntermediateSequenceProtein[0][_IX] , lScore );
+      // Transform KI into a vector
+      __m128i __KI = _mm_set1_epi32(KI);
+      // Load Transitions
+      __m128i __TransitionsI = _mm_loadl_epi64((__m128i*) &Transitions[0][_IM]);
+      // Convert signed WORD into signed DWORD
+      __TransitionsI = _MM_CVTEPI16_EPI32(__TransitionsI);
+      // Add KI to Transition
+      __TransitionsI = _mm_add_epi32(__TransitionsI, __KI);
+
+       // Load Transitions
+      __m128i __TransitionsX = _mm_loadl_epi64((__m128i*) &Transitions[0][_XM]);
+      // Convert signed WORD into signed DWORD
+      __TransitionsX = _MM_CVTEPI16_EPI32(__TransitionsX);
+
+      // Get maximum ( this is SSE 4.1 )
+      __m128i __max = _mm_max_epi32(__TransitionsI, __TransitionsX);
+
+      // Store IOPI and IOPM
+      _mm_storel_pi( (__m64*) IOP_W, (__m128) __max);
+  #else
+      // Transform KI into a vector
+      __m128i __KI = _mm_set1_epi32(KI);
+      // Load Transitions
+      __m128i __TransitionsI = _mm_loadl_epi64((__m128i*) &Transitions[0][_IM]);
+      // Convert signed WORD into signed DWORD
+      __TransitionsI = _MM_CVTEPI16_EPI32(__TransitionsI);
+      // Add KI to Transition
+      __TransitionsI = _mm_add_epi32(__TransitionsI, __KI);
+
+       // Load Transitions
+      __m128i __TransitionsX = _mm_loadl_epi64((__m128i*) &Transitions[0][_XM]);
+      // Convert signed WORD into signed DWORD
+      __TransitionsX = _MM_CVTEPI16_EPI32(__TransitionsX);
+
+      // Insert lScore into __TransitionsX
+      __TransitionsX = _mm_insert_epi32(__TransitionsX, lScore, 3);
+
+      // Get maximum ( this is SSE 4.1 )
+      __m128i __max = _mm_max_epi32(__TransitionsI, __TransitionsX);
+
+      // Store IOPI and IOPM
+      _mm_storel_pi( (__m64*) IOP_W, (__m128) __max);
+
+      // Backup new score to xmm register
+      lScore = _mm_extract_epi32(__max,3);
+  #endif
+#endif
+    }
+    
+    lInsertion += AlignStep;
+    register const short int * restrict lMatch = Match;
+    
+#ifndef _SSE_4_1_
+    for (int iprf=1; iprf<=prf->Length; ++iprf ) {
+      const int KM = KOPM         + lMatch[j1];
+      const int KI = IOPI_R(iprf) + lInsertion[j1]; 
+      const int KD = KOPD         + lMatch[_D];
+      //printf("%i %i\tKM: %i\tKI: %i\t KD: %i\t Score: %i\t %i %i\n", iseq, iprf, KM,KI,KD,lScore, lInsertion[j1],IOPI[iprf]);
+      //printf("%2i %2i\t%5i %5i %5i %5i %5i %5i %5i\n", iseq, iprf, KOPM, lMatch[j1], IOPM[iprf], IOPI[iprf],  lInsertion[j1], KOPD, lMatch[_D]);
+      //printf("%3i %3i %3i %3i\n", iprf, IntermediateSequenceProtein[iprf][_MX], IntermediateSequenceProtein[iprf][_IX], IntermediateSequenceProtein[iprf][_DX]);
+      lMatch     += AlignStep;
+      lInsertion += AlignStep;
+
+      KOPM = IOPM_R(iprf);
+
+      const int tIOPM1 = MAX( KM + (int) Transitions[iprf][_MM] ,      (int) Transitions[iprf][_XM] );
+      const int tIOPM2 = MAX( KI + (int) Transitions[iprf][_IM] , KD + (int) Transitions[iprf][_DM] );
+      IOPM_W(iprf)       = MAX( tIOPM1, tIOPM2);
+      
+      const int tIOPI1 = MAX( KM + (int) Transitions[iprf][_MI] ,      (int) Transitions[iprf][_XI] );
+      const int tIOPI2 = MAX( KI + (int) Transitions[iprf][_II] , KD + (int) Transitions[iprf][_DI] );
+      IOPI_W(iprf)       = MAX( tIOPI1, tIOPI2);
+
+      const int tIOPD1 = MAX( KM + (int) Transitions[iprf][_MD] ,      (int) Transitions[iprf][_XD] );
+      const int tIOPD2 = MAX( KI + (int) Transitions[iprf][_ID] , KD + (int) Transitions[iprf][_DD] );
+      KOPD             = MAX( tIOPD1, tIOPD2);
+  #ifndef _PACKED_TRANSITIONS_      
+      const int tIOPT1 = MAX( KM + (int) IntermediateSequenceProtein[iprf][_MX], KI + (int) IntermediateSequenceProtein[iprf][_IX] );
+      const int tIOPT2 = MAX( lScore                                           , KD + (int) IntermediateSequenceProtein[iprf][_DX] );
+  #else
+      const int tIOPT1 = MAX( KM + (int) Transitions[iprf][_MX], KI + (int) Transitions[iprf][_IX] );
+      const int tIOPT2 = MAX( lScore                           , KD + (int) Transitions[iprf][_DX] );
+  #endif
+      lScore           = MAX( tIOPT1, tIOPT2);
+
+//       printf("%i %i\t\t%i\t%i\t\t%i\t%i\t%i\t\t%i\t%i\t%i\t%i\t\t%i\n",
+//              iseq, iprf,
+//              IOPM(iprf), IOPI(iprf),
+//              KM, KI, KD,
+//              Transitions[iprf][_MM], Transitions[iprf][_IM],  Transitions[iprf][_DM],  Transitions[iprf][_XM],
+//              lScore);
+    }
+
+    // Swap Read and Write pointers
+    int * ptr = IOPM_W;
+    IOPM_W = (int*) IOPM_R;
+    IOPM_R = ptr;
+    ptr    = IOPI_W;
+    IOPI_W = (int*) IOPI_R;
+    IOPI_R = ptr;
+#else
+    for (int iprf=1; iprf<=prf->Length; ++iprf ) {
+//     size_t iprf = 1; //prf->Length;
+//     do {
+      const int KM = KOPM         + (int) lMatch[j1];
+      const int KI = IOPI_R(iprf) + (int) lInsertion[j1];
+      const int KD = KOPD         + (int) lMatch[_D];
+
+      lMatch     += AlignStep;
+      lInsertion += AlignStep;
+
+      KOPM = IOPM_R(iprf);
+
+      // Transform KM into a vector
+      __m128i __KM = _mm_set1_epi32(KM);
+      // Load Transitions
+      __m128i __TransitionsM = _mm_loadl_epi64((__m128i*) &Transitions[iprf][_MM]);
+      // Convert signed WORD into signed DWORD
+      __TransitionsM = _MM_CVTEPI16_EPI32(__TransitionsM);
+      // Add KM to Transition
+      __TransitionsM = _mm_add_epi32(__TransitionsM, __KM);
+
+    
+      // Transform KI into a vector
+      __m128i __KI = _mm_set1_epi32(KI);
+      // Load Transitions
+      __m128i __TransitionsI = _mm_loadl_epi64((__m128i*) &Transitions[iprf][_IM]);
+      // Convert signed WORD into signed DWORD
+      __TransitionsI = _MM_CVTEPI16_EPI32(__TransitionsI);
+      // Add KI to Transition
+      __TransitionsI = _mm_add_epi32(__TransitionsI, __KI);
+
+      // Get maximum ( this is SSE 4.1 )
+      __m128i __max1 = _mm_max_epi32(__TransitionsM, __TransitionsI);
+
+  #ifndef _PACKED_TRANSITIONS_
+      const int tIOPT1 = MAX( KM + (int) IntermediateSequenceProtein[iprf][_MX], KI + (int) IntermediateSequenceProtein[iprf][_IX] );
+  #endif
+      // Load Transitions
+      __m128i __TransitionsX = _mm_loadl_epi64((__m128i*) &Transitions[iprf][_XM]);
+      // Convert signed WORD into signed DWORD
+      __TransitionsX = _MM_CVTEPI16_EPI32(__TransitionsX);
+      // Transform KD into a vector
+      __m128i __KD = _mm_set1_epi32(KD);
+
+      // Load Transitions
+      __m128i __TransitionsD = _mm_loadl_epi64((__m128i*) &Transitions[iprf][_DM]);
+      // Convert signed WORD into signed DWORD
+      __TransitionsD = _MM_CVTEPI16_EPI32(__TransitionsD);
+      // Add KD to Transition
+      __TransitionsD = _mm_add_epi32(__TransitionsD, __KD);
+
+  #ifndef _PACKED_TRANSITIONS_
+      const int tIOPT2 = MAX( lScore                                           , KD + (int) IntermediateSequenceProtein[iprf][_DX] );
+  #endif
+
+
+
+  #ifdef _PACKED_TRANSITIONS_
+      __TransitionsX = _mm_insert_epi32(__TransitionsX, lScore, 3);
+  #endif
+      
+      // Get maximum ( this is SSE 4.1 )
+      __m128i __max2 = _mm_max_epi32(__TransitionsD, __TransitionsX);
+      __max1 = _mm_max_epi32(__max1, __max2);
+
+      // Store IOPI and IOPM
+      _mm_storel_pi( (__m64*) &IOP_W[iprf], (__m128) __max1);
+
+      // Set KOPD ( this is SSE 4.1 )
+      KOPD = _mm_extract_epi32(__max1,2);
+
+  #ifndef _PACKED_TRANSITIONS_
+      lScore = MAX( tIOPT1, tIOPT2);
+  #else
+      lScore = _mm_extract_epi32(__max1,3);
+  #endif
+
+//       printf("%i %i\t\t%i\t%i\t\t%i\t%i\t%i\t\t%i\t%i\t%i\t%i\t\t%i\n",
+//              iseq, iprf,
+//              IOPM(iprf), IOPI(iprf),
+//              KM, KI, KD,
+//              Transitions[iprf][_MM], Transitions[iprf][_IM],  Transitions[iprf][_DM],  Transitions[iprf][_XM],
+//              lScore);
+
+    } //while (++iprf <= prf->Length);
+
+    // Swap Read and Write pointers
+    sIOP * ptr = IOP_W;
+    IOP_W = (sIOP*) IOP_R;
+    IOP_R = ptr;
+#endif
+
+//     printf("%i %i\n", iseq+1, lScore);
+    if ( ! LOPT && lScore > CutOff) return lScore;
+  } 
+  {
+    register const short int * restrict lInsertion = Insertion;
+    const int j1 = (int) Sequence[LSEQ-1];
+    int KOPM     = IOPM_R(0);
+    int KI       = IOPI_R(0) + lInsertion[j1];
+    
+    KOPD   = MAX( KI + (int) Transitions[0][_ID],      (int) Transitions[0][_XD] );
+    register const short int (* const restrict LastSequenceProtein)[LAST_SIZE] = prf->Scores.Insertion.LastSequenceProtein;
+    lScore = MAX( lScore                        , KI + (int) LastSequenceProtein[0][_IY] );
+  
+    register const short int * restrict lMatch = Match;
+    lInsertion += AlignStep;
+    
+    for (int iprf=1; iprf<=prf->Length; ++iprf) {
+      const int KM = KOPM         + lMatch[j1];
+      KI           = IOPI_R(iprf) + lInsertion[j1];
+      const int KD = KOPD         + lMatch[_D];
+
+      lMatch     += AlignStep;
+      lInsertion += AlignStep;
+
+      KOPM = IOPM_R(iprf);
+
+      const int tIOPD1 = MAX( KM + (int) Transitions[iprf][_MD],      (int) Transitions[iprf][_XD] );
+      const int tIOPD2 = MAX( KI + (int) Transitions[iprf][_ID], KD + (int) Transitions[iprf][_DD] );
+      KOPD             = MAX( tIOPD1, tIOPD2);
+
+      const int tIOPT1 = MAX( KM + (int) LastSequenceProtein[iprf][_MY], KI + (int) LastSequenceProtein[iprf][_IY] );
+      const int tIOPT2 = MAX( lScore                                   , KD + (int) LastSequenceProtein[iprf][_DY] );
+      lScore           = MAX( tIOPT1, tIOPT2);
+    }
+  }
+  //printf("That one went to the end\n");
+  return lScore;
+}
+
+#undef MAX
diff --git a/src/C/generic/xalip.c b/src/C/generic/xalip.c
new file mode 100644
index 0000000..0558449
--- /dev/null
+++ b/src/C/generic/xalip.c
@@ -0,0 +1,790 @@
+/*******************************************************
+                        PFTOOLS
+ *******************************************************
+  Sep 30, 2011 xalip.c
+ *******************************************************
+ (C) 2011 Swiss Institute of Bioinformatics
+     Thierry Schuepbach (thierry.schuepbach at isb-sib.ch)
+ *******************************************************/
+#include <stdlib.h>
+#include <stdio.h>
+#include <inttypes.h>
+#include <stdbool.h>
+
+#include "profile.h"
+
+#define MAX(a,b) (a>b) ? a : b
+#define MIN(a,b) (a<b) ? a : b
+
+struct Minima {
+   int _a;
+   int _b;
+   int _c;
+};
+
+static void InitR(const int iseq, const size_t N1, const size_t N2, const size_t bseq, const size_t lseq,
+                  union lScores * const restrict iop, union Positions * const restrict iom,
+                  union Positions * const restrict ioi,  const struct Profile * const restrict prf) 
+{
+	int KOPD;
+#ifdef XALIP_DEBUG
+	fprintf(stdout,"InitR called with index %i bseq %lu\n",iseq, bseq);
+#endif
+	// Are we treating sequence index below given start?
+	register const ScoreTuple * restrict FirstSequenceProtein = ( iseq < bseq ) 
+	   ? &(prf->Scores.Insertion.FirstSequenceProtein[0])
+	   : &(prf->Scores.Insertion.Transitions->From[EXTRA]);
+	const size_t FirstSequenceProteinAlignStep = (iseq < bseq) ? 1 : 4;
+	  
+  register int (* restrict pIOP)[4] = &(iop[0].Element);
+  
+  for (int i=0; i<4; ++i) {
+    pIOP[0][i] = (int) FirstSequenceProtein->To[i];
+  }
+  
+  // Set KOPD
+  KOPD = pIOP[0][DELETION];
+
+  register const short int * restrict pTransitions = &(prf->Scores.Insertion.Transitions[1].Element[_DM]);
+  register const short int * restrict pMatch       = &prf->Scores.Match.Alphabet[_D]; 
+  const size_t AlignStep = prf->Scores.Match.AlignStep;
+  
+  // Move to next profile First Sequence
+  FirstSequenceProtein += FirstSequenceProteinAlignStep;
+  
+  for (unsigned int iprf=1; iprf<=(unsigned int) prf->Length; ++iprf) {
+    register const int KD = KOPD + (int) *pMatch;
+    pMatch += AlignStep;
+    
+    // Load Transitions
+    int __Transitions[4];
+    for (int i=0; i<4; ++i) __Transitions[i] = KD + (int) pTransitions[i];    
+	  
+    // Move to next profile transitions
+    pTransitions += INSERTION_TRANSITIONS_SIZE;
+
+    // Move to next profile First Sequence
+    FirstSequenceProtein += FirstSequenceProteinAlignStep;
+    
+    // Get maximum
+    int __FirstSequenceProtein[4];
+    for (int i=0; i<4; ++i) {
+      __FirstSequenceProtein[i] = (int) FirstSequenceProtein->To[i];
+      pIOP[iprf][i] = (__Transitions[i] > __FirstSequenceProtein[i]) ? __Transitions[i] : __FirstSequenceProtein[i];
+    }
+    
+    // Set KOPD ( this is SSE 4.1 )
+    KOPD = pIOP[iprf][DELETION];
+  } 
+	      
+  union Positions TPOS __attribute__((aligned(16)));
+  TPOS.Element.One   = lseq + 1;
+  TPOS.Element.Two   = 0;
+  TPOS.Element.B     = iseq + 1;
+  TPOS.Element.dummy = 0;
+  
+  for (unsigned int iprf=0; iprf<(unsigned int) (N1-1); ++iprf) {
+    _mm_store_si128(&(iom[iprf].xmm), TPOS.xmm);
+    _mm_store_si128(&(ioi[iprf].xmm), TPOS.xmm);
+  }
+
+  if (N1 == 0) { fputs("BUG HERE N1 is NULL\n", stderr); exit(1);}
+  ioi[N1-1].xmm = TPOS.xmm; // Warning N1 > 0 ?
+  TPOS.Element.One = TPOS.Element.B;
+  TPOS.Element.Two = TPOS.Element.B;
+  iom[N1-1].xmm = TPOS.xmm;
+
+  for (unsigned int iprf=N1; iprf<(unsigned int)N2; ++iprf) {
+    _mm_store_si128(&(iom[iprf].xmm), TPOS.xmm);
+    _mm_store_si128(&(ioi[iprf].xmm), TPOS.xmm);
+  } 
+	 
+  TPOS.Element.One = lseq + 1;
+  TPOS.Element.Two = 0;
+	
+  for (unsigned int iprf=(unsigned int) N2; iprf<=(unsigned int)prf->Length; ++iprf) {
+    _mm_store_si128(&(iom[iprf].xmm), TPOS.xmm);
+    _mm_store_si128(&(ioi[iprf].xmm), TPOS.xmm);
+  }
+}
+
+static void nextR(const struct Profile * const restrict prf, const unsigned char * const restrict Sequence,
+                  const int iseq, union lScores * const restrict iop, union Positions * const restrict iom,
+                  union Positions * const restrict ioi,const int lseq, struct Alignment * const restrict alignment,
+                  struct Minima * const restrict ifer, const _Bool Lock, const size_t N1, const size_t N2)
+{
+#ifdef XALIP_DEBUG
+   fprintf(stdout,"NextR called with iseq %i\n",iseq);
+#endif
+   // Initialization
+   const unsigned int In = iseq + 1;
+   // WARNING: Fortran uses a 1 based index for sequence
+   const unsigned int SequenceIndex = (unsigned int) Sequence[iseq-1];
+   
+   if ( iseq >= lseq) {
+      fputs("nextR_last should have been called\n", stderr);
+      exit(1);   
+   } 
+   
+   // Disable match and insert vertices of protected region
+   if (Lock) {
+      iop[N1-1].Element[MATCH] = NLOW;
+      for (size_t iprf=N1; iprf<N2; ++iprf) {
+         iop[iprf].Element[MATCH]     = NLOW;
+         iop[iprf].Element[INSERTION] = NLOW;
+      } 
+   }
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   // Profile position 0
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   
+   // Save previous match position
+   int Kopm = iop[0].Element[MATCH];
+   union Positions Kpos __attribute__((aligned(16)));
+   Kpos.xmm = iom[0].xmm;
+   
+   const union Positions TEMPpos __attribute__((aligned(16))) = { lseq+1, 0, In, 0 };
+   
+   const union Positions * restrict PTRpos[4];
+   union Positions Kiod;
+   PTRpos[0] = &TEMPpos;
+   PTRpos[1] = &Kpos;
+   PTRpos[3] = &Kiod;
+     
+   // Get pointers to score data
+   const TransitionScores * const restrict Transitions = prf->Scores.Insertion.Transitions;
+   const short int * restrict Insertion = prf->Scores.Insertion.Alphabet;
+   const size_t AlignStep = prf->Scores.Insertion.AlignStep;
+   
+   int Ki = iop[0].Element[INSERTION] + (int) Insertion[SequenceIndex];
+   
+   // Match position
+   int Ji   = Ki + (int) Transitions[0].From[INSERTION].To[MATCH];
+   int itmp = (int) Transitions[0].From[EXTRA].To[MATCH];
+   if ( Ji > itmp) {
+      iop[0].Element[MATCH] = Ji;
+      iom[0].xmm = ioi[0].xmm;
+   } else {
+      iop[0].Element[MATCH] = itmp;
+      iom[0].xmm = TEMPpos.xmm;
+   }
+   
+   // Deletion position
+   int Kopd;
+   Ji   = Ki + (int) Transitions[0].From[INSERTION].To[DELETION];
+   itmp = (int) Transitions[0].From[EXTRA].To[DELETION];
+   if ( Ji > itmp ) {
+      Kopd     = Ji;
+      Kiod.xmm = ioi[0].xmm;
+   } else {
+      Kopd     = itmp;
+      Kiod.xmm = TEMPpos.xmm; 
+   } 
+
+   // Insertion position
+   Ji   = Ki + (int) Transitions[0].From[INSERTION].To[INSERTION];
+   itmp = (int) Transitions[0].From[EXTRA].To[INSERTION];
+   if ( Ji > itmp ) {
+      iop[0].Element[INSERTION] = Ji;
+   } else {
+      iop[0].Element[INSERTION] = itmp;
+      ioi[0].xmm = TEMPpos.xmm;
+   }
+   
+   // Initialize minima
+   ifer->_a = iseq;
+   ifer->_b = iseq;
+   itmp     = MIN(ioi[0].Element.B, iom[0].Element.B);
+   ifer->_c = MIN(itmp, Kiod.Element.B); 
+   
+   // Initialize alignment
+   union Positions Fpos __attribute__((aligned(16)));;
+   Fpos.Element.One   = alignment->JAL1;
+   Fpos.Element.Two   = alignment->JAL2;
+   Fpos.Element.B     = alignment->JALB;
+   Fpos.Element.dummy = 0;
+   
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   // Loop through rest of profile
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   const short int * restrict Match = prf->Scores.Match.Alphabet;
+   Insertion += AlignStep;
+   
+   for (int iprf=1; iprf<=prf->Length; ++iprf) {
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Match
+      const register int KM = Kopm + (int) Match[SequenceIndex];
+      Kopm = iop[iprf].Element[MATCH];
+      
+      __m128i __KM = _mm_set1_epi32(KM);
+      // Load Transitions
+      __m128i __TransitionsM = _mm_loadl_epi64((__m128i*) &(Transitions[iprf].From[MATCH]));
+      // Convert signed WORD into signed DWORD
+      __TransitionsM = _mm_cvtepi16_epi32(__TransitionsM);
+      // Add KM to Transitions
+      __TransitionsM = _mm_add_epi32(__TransitionsM, __KM);
+      
+
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Insertion
+      const register int KI = iop[iprf].Element[INSERTION] + (int) Insertion[SequenceIndex]; 
+      // one could move on the seq index instead
+      
+      __m128i __KI = _mm_set1_epi32(KI);
+      // Load Transitions
+      __m128i __TransitionsI = _mm_loadl_epi64((__m128i*) &(Transitions[iprf].From[INSERTION]));
+      // Convert signed WORD into signed DWORD
+      __TransitionsI = _mm_cvtepi16_epi32(__TransitionsI);
+      // Add KM to Transitions
+      __TransitionsI = _mm_add_epi32(__TransitionsI, __KI);
+      
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Deletion
+      const register int KD = Kopd + (int) Match[_D];   
+      
+      __m128i __KD = _mm_set1_epi32(KD);
+      // Load Transitions
+      __m128i __TransitionsD = _mm_loadl_epi64((__m128i*) &(Transitions[iprf].From[DELETION]));
+      // Convert signed WORD into signed DWORD
+      __TransitionsD = _mm_cvtepi16_epi32(__TransitionsD);
+      // Add KM to Transitions
+      __TransitionsD = _mm_add_epi32(__TransitionsD, __KD);
+      
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Extensions
+      // Load Transitions
+      __m128i __TransitionsX = _mm_loadl_epi64((__m128i*) &(Transitions[iprf].From[EXTRA]));
+      // Convert signed WORD into signed DWORD
+      __TransitionsX = _mm_cvtepi16_epi32(__TransitionsX);
+      
+      // Insert NLOW into Extension vector -> done in io.c
+      //__TransitionsX = _mm_insert_epi32(__TransitionsX, NLOW, DUMMY);
+      
+      // Move to next profile index
+      Match     += AlignStep;
+      Insertion += AlignStep;
+
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Compute Maxima (Fortran Nstep function)
+      __m128i __Index = (__m128i) _mm_setzero_si128();
+      __m128i __three = _mm_set_epi32(3,3,3,3);
+      
+      __m128i  __Mask = _mm_cmpgt_epi32(__TransitionsD, __TransitionsX);
+      __TransitionsX  = _mm_blendv_epi8(__TransitionsX, __TransitionsD, __Mask);
+      __Index         = _mm_blendv_epi8(__Index, __three, __Mask);
+      
+      __m128i __One  = _mm_set_epi32(1,1,1,1);
+      __Mask         = _mm_cmpgt_epi32(__TransitionsM, __TransitionsX);
+      __TransitionsX = _mm_blendv_epi8(__TransitionsX, __TransitionsM, __Mask);
+      __Index        = _mm_blendv_epi8(__Index, __One, __Mask);
+      
+      __m128i __Two  = _mm_add_epi32(__One, __One);
+      __Mask         = _mm_cmpgt_epi32(__TransitionsI, __TransitionsX);
+      __TransitionsX = _mm_blendv_epi8(__TransitionsX, __TransitionsI, __Mask);
+      __Index        = _mm_blendv_epi8(__Index, __Two, __Mask);
+      
+      // Set new data
+      iop[iprf].xmm = __TransitionsX;
+      //StoreMatchInsertion((__m64*) &iop[iprf],(__m128) __TransitionsX);
+      Kopd = _mm_extract_epi32(__TransitionsX, DELETION);
+
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Check for new maxima
+      const int KE = _mm_extract_epi32(__TransitionsX, DUMMY);
+      if (KE > alignment->JALS) {
+         alignment->JALS = KE;
+         alignment->JALE = iseq;
+         Fpos.xmm = ioi[iprf].xmm;
+         const unsigned int Id = (unsigned int) _mm_extract_epi32(__Index, DUMMY);
+         if (Id == 1)  { // KM is max
+               Fpos.xmm = Kpos.xmm;
+         } else if (Id == 3) { // KD is max
+               Fpos.xmm = Kiod.xmm;
+         }
+      }
+#ifdef XALIP_DEBUG
+      printf("FPOS %8i %8i %8i\n", Fpos.Element.One, Fpos.Element.Two, Fpos.Element.B);
+#endif
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Update alignment positions
+      union Positions Jpos __attribute__((aligned(16)));
+      Jpos.xmm  = iom[iprf].xmm;
+      PTRpos[2] = &ioi[iprf];
+      
+      const int NewM = _mm_extract_epi32(__Index, MATCH);
+      iom[iprf].xmm  = PTRpos[NewM]->xmm;
+      
+      const int NewD = _mm_extract_epi32(__Index, DELETION);
+      Kiod.xmm       = PTRpos[NewD]->xmm;
+      
+      const int NewI = _mm_extract_epi32(__Index, INSERTION);
+      ioi[iprf].xmm  = PTRpos[NewI]->xmm;
+      
+      Kpos.xmm = Jpos.xmm;
+      
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Update minima
+      
+      const int t1 = MIN(ioi[iprf].Element.One, iom[iprf].Element.One);
+      const int t2 = MIN(t1, Kiod.Element.One);
+      ifer->_a     = MIN(ifer->_a, t2);
+      
+      if (iprf > N1) {
+         ifer->_b = MIN(ifer->_b, t2);   
+      }
+      const int t3 = MIN(ioi[iprf].Element.B, iom[iprf].Element.B);
+      const int t4 = MIN(t3, Kiod.Element.B);
+      ifer->_c     = MIN(ifer->_c, t4);  
+   }
+   
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   // Epilogue
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   
+   // Finish updating alignment positions
+   alignment->JAL1 = Fpos.Element.One;
+   alignment->JAL2 = Fpos.Element.Two;
+   alignment->JALB = Fpos.Element.B;
+   
+   // Entry and exit from protected regions
+   iom[N1-1].Element.One = MIN(iom[N1-1].Element.One, In);
+   iom[N1-1].Element.Two = In;
+   
+   for (int iprf=N1; iprf<N2; ++iprf) {
+      iom[iprf].Element.One = MIN(iom[iprf].Element.One, In);
+      iom[iprf].Element.Two = In;
+   
+      ioi[iprf].Element.One = MIN(ioi[iprf].Element.One, In);
+      ioi[iprf].Element.Two = In;
+   }  
+   
+#ifdef XALIP_DEBUG
+   for (int iprf=0; iprf<=prf->Length; ++iprf) {
+      printf("NEXTR IOP %4.4i %15i %15i %15i\n", iprf, iop[iprf].Element[MATCH], iop[iprf].Element[INSERTION],
+             iop[iprf].Element[DELETION]);
+      printf("NEXTR IOM %4.4i %15i %15i %15i\n", iprf, iom[iprf].Element.One, iom[iprf].Element.Two,
+             iom[iprf].Element.B);
+      printf("NEXTR IOI %4.4i %15i %15i %15i\n", iprf, ioi[iprf].Element.One, ioi[iprf].Element.Two,
+             ioi[iprf].Element.B);
+      
+   }
+   
+   printf("NEXTR ALIGN %4i %4i %4i %4i %4i\n",
+                   alignment->JAL1, alignment->JAL2, alignment->JALS, alignment->JALB, alignment->JALE); 
+#endif
+}
+
+static void nextR_last(const struct Profile * const restrict prf, const unsigned char * const restrict Sequence,
+                       const int iseq, union lScores * const restrict iop, union Positions * const restrict iom,
+                       union Positions * const restrict ioi,const int lseq, struct Alignment * const restrict alignment,
+                       struct Minima * const restrict ifer, const _Bool Lock, const size_t N1, const size_t N2)
+{
+#ifdef XALIP_DEBUG
+   fprintf(stdout,"NextR_last called with iseq %i\n",iseq);
+#endif
+   // Initialization
+   const unsigned int In = iseq + 1;
+   // WARNING: Fortran uses a 1 based index for sequence
+   const unsigned int SequenceIndex = (unsigned int) Sequence[iseq-1];
+   
+   if ( iseq < lseq) {
+      fputs("nextR should have been called\n", stderr);
+      exit(1);   
+   } 
+   
+   // Disable match and insert vertices of protected region
+   if (Lock) {
+      iop[N1-1].Element[MATCH] = NLOW;
+      for (int iprf=N1; iprf<N2; ++iprf) {
+         iop[iprf].Element[MATCH]     = NLOW;
+         iop[iprf].Element[INSERTION] = NLOW;
+      } 
+   }
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   // Profile position 0
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   
+   // Save previous match position
+   int Kopm = iop[0].Element[MATCH];
+   union Positions Kpos __attribute__((aligned(16)));
+   Kpos.xmm = iom[0].xmm;
+   
+   const union Positions TEMPpos __attribute__((aligned(16))) = { lseq+1, 0, In, 0 };
+   
+   const union Positions * restrict PTRpos[4];
+   union Positions Kiod;
+   PTRpos[0] = &TEMPpos;
+   PTRpos[1] = &Kpos;
+   PTRpos[3] = &Kiod;
+     
+   // Get pointers to score data
+   const TransitionScores * const restrict Transitions = prf->Scores.Insertion.Transitions;
+   const short int * restrict Insertion = prf->Scores.Insertion.Alphabet;
+   const size_t AlignStep = prf->Scores.Insertion.AlignStep;
+   
+   int Ki = iop[0].Element[INSERTION] + (int) Insertion[SequenceIndex];
+   
+   // Match position
+   int Ji   = Ki + (int) Transitions[0].From[INSERTION].To[MATCH];
+   int itmp = (int) Transitions[0].From[EXTRA].To[MATCH];
+   if ( Ji > itmp) {
+      iop[0].Element[MATCH] = Ji;
+      iom[0].xmm = ioi[0].xmm;
+   } else {
+      iop[0].Element[MATCH] = itmp;
+      iom[0].xmm = TEMPpos.xmm;
+   }
+   
+   // Deletion position
+   int Kopd;
+   Ji   = Ki + (int) Transitions[0].From[INSERTION].To[DELETION];
+   itmp = (int) Transitions[0].From[EXTRA].To[DELETION];
+   if ( Ji > itmp ) {
+      Kopd     = Ji;
+      Kiod.xmm = ioi[0].xmm;
+   } else {
+      Kopd     = itmp;
+      Kiod.xmm = TEMPpos.xmm; 
+   } 
+
+   // Insertion position
+   Ji   = Ki + (int) Transitions[0].From[INSERTION].To[INSERTION];
+   itmp = (int) Transitions[0].From[EXTRA].To[INSERTION];
+   if ( Ji > itmp ) {
+      iop[0].Element[INSERTION] = Ji;
+   } else {
+      iop[0].Element[INSERTION] = itmp;
+      ioi[0].xmm = TEMPpos.xmm;
+   }
+   
+   // Initialize minima
+   ifer->_a = iseq;
+   ifer->_b = iseq;
+   itmp     = MIN(ioi[0].Element.B, iom[0].Element.B);
+   ifer->_c = MIN(itmp, Kiod.Element.B); 
+   
+   // Initialize alignment
+   union Positions Fpos __attribute__((aligned(16)));
+   Fpos.Element.One   = alignment->JAL1;
+   Fpos.Element.Two   = alignment->JAL2;
+   Fpos.Element.B     = alignment->JALB;
+   Fpos.Element.dummy = 0;
+   
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   // Loop through rest of profile
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   const short int * restrict Match = prf->Scores.Match.Alphabet;
+   const ScoreTuple * const restrict LastProteinSequence = prf->Scores.Insertion.LastSequenceProtein;
+   Insertion += AlignStep;
+   
+   for (int iprf=1; iprf<=prf->Length; ++iprf) {
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Match
+      const register int KM = Kopm + (int) Match[SequenceIndex];
+      Kopm = iop[iprf].Element[MATCH];
+      
+      __m128i __KM = _mm_set1_epi32(KM);
+      // Load Transitions
+      __m128i __TransitionsM = _mm_loadl_epi64((__m128i*) &(Transitions[iprf].From[MATCH]));
+      // Convert signed WORD into signed DWORD
+      __TransitionsM = _mm_cvtepi16_epi32(__TransitionsM);
+      // Insert LastProteinSequence
+      __TransitionsM = _mm_insert_epi32(__TransitionsM, (int) LastProteinSequence[iprf].From[MATCH], DUMMY);
+      // Add KM to Transitions
+      __TransitionsM = _mm_add_epi32(__TransitionsM, __KM);
+      
+
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Insertion
+      const register int KI = iop[iprf].Element[INSERTION] + (int) Insertion[SequenceIndex]; 
+      // one could move on the seq index instead
+      
+      __m128i __KI = _mm_set1_epi32(KI);
+      // Load Transitions
+      __m128i __TransitionsI = _mm_loadl_epi64((__m128i*) &(Transitions[iprf].From[INSERTION]));
+      // Convert signed WORD into signed DWORD
+      __TransitionsI = _mm_cvtepi16_epi32(__TransitionsI);
+      // Insert LastProteinSequence
+      __TransitionsI = _mm_insert_epi32(__TransitionsI, (int) LastProteinSequence[iprf].From[INSERTION], DUMMY);
+      // Add KM to Transitions
+      __TransitionsI = _mm_add_epi32(__TransitionsI, __KI);
+      
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Deletion
+      const register int KD = Kopd + (int) Match[_D];   
+      
+      __m128i __KD = _mm_set1_epi32(KD);
+      // Load Transitions
+      __m128i __TransitionsD = _mm_loadl_epi64((__m128i*) &(Transitions[iprf].From[DELETION]));
+      // Convert signed WORD into signed DWORD
+      __TransitionsD = _mm_cvtepi16_epi32(__TransitionsD);
+      // Insert LastProteinSequence
+      __TransitionsD = _mm_insert_epi32(__TransitionsD, (int) LastProteinSequence[iprf].From[DELETION], DUMMY);
+      // Add KM to Transitions
+      __TransitionsD = _mm_add_epi32(__TransitionsD, __KD);
+      
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Extensions
+      // Load Transitions
+      __m128i __TransitionsX = _mm_loadl_epi64((__m128i*) &(Transitions[iprf].From[EXTRA]));
+      // Convert signed WORD into signed DWORD
+      __TransitionsX = _mm_cvtepi16_epi32(__TransitionsX);
+      
+      // Insert NLOW into Extension vector -> done in io.c
+      //__TransitionsX = _mm_insert_epi32(__TransitionsX, NLOW, DUMMY);
+      
+      // Move to next profile index
+      Match     += AlignStep;
+      Insertion += AlignStep;
+
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Compute Maxima (Fortran Nstep function)
+      __m128i __Index = (__m128i) _mm_setzero_ps();
+      __m128i __three = _mm_set_epi32(3,3,3,3);
+      
+      __m128i  __Mask = _mm_cmpgt_epi32(__TransitionsD, __TransitionsX);
+      __TransitionsX  = _mm_blendv_epi8(__TransitionsX, __TransitionsD, __Mask);
+      __Index         = _mm_blendv_epi8(__Index, __three, __Mask);
+      
+      __m128i __One  = _mm_set_epi32(1,1,1,1);
+      __Mask         = _mm_cmpgt_epi32(__TransitionsM, __TransitionsX);
+      __TransitionsX = _mm_blendv_epi8(__TransitionsX, __TransitionsM, __Mask);
+      __Index        = _mm_blendv_epi8(__Index, __One, __Mask);
+      
+      __m128i __Two  = _mm_add_epi32(__One, __One);
+      __Mask         = _mm_cmpgt_epi32(__TransitionsI, __TransitionsX);
+      __TransitionsX = _mm_blendv_epi8(__TransitionsX, __TransitionsI, __Mask);
+      __Index        = _mm_blendv_epi8(__Index, __Two, __Mask);
+      
+      // Set new data
+      iop[iprf].xmm = __TransitionsX;
+      //_mm_storel_pi((__m64*) &iop[iprf],(__m128) __TransitionsX);
+      Kopd = _mm_extract_epi32(__TransitionsX, DELETION);
+      
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Check for new maxima
+      const int KE = _mm_extract_epi32(__TransitionsX, DUMMY);
+      if (KE > alignment->JALS) {
+         alignment->JALS = KE;
+         alignment->JALE = iseq;
+         Fpos.xmm = ioi[iprf].xmm;
+         const unsigned int Id = (unsigned int) _mm_extract_epi32(__Index, DUMMY);
+         if (Id == 1)  { // KM is max
+               Fpos.xmm = Kpos.xmm;
+         } else if (Id == 3) { // KD is max
+               Fpos.xmm = Kiod.xmm;
+         }
+      }
+#ifdef XALIP_DEBUG
+      printf("FPOS %8i %8i %8i\n", Fpos.Element.One, Fpos.Element.Two, Fpos.Element.B);
+#endif
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Update alignment positions
+      union Positions Jpos __attribute__((aligned(16))); 
+      Jpos.xmm  = iom[iprf].xmm;
+      PTRpos[2] = &ioi[iprf];
+      
+      const int NewM = _mm_extract_epi32(__Index, MATCH);
+      iom[iprf].xmm  = PTRpos[NewM]->xmm;
+      
+      const int NewD = _mm_extract_epi32(__Index, DELETION);
+      Kiod.xmm       = PTRpos[NewD]->xmm;
+      
+      const int NewI = _mm_extract_epi32(__Index, INSERTION);
+      ioi[iprf].xmm  = PTRpos[NewI]->xmm;
+      
+      Kpos.xmm = Jpos.xmm;
+      
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Update minima
+      
+      const int t1 = MIN(ioi[iprf].Element.One, iom[iprf].Element.One);
+      const int t2 = MIN(t1, Kiod.Element.One);
+      ifer->_a     = MIN(ifer->_a, t2);
+      
+      if (iprf > N1) {
+         ifer->_b = MIN(ifer->_b, t2);   
+      }
+      const int t3 = MIN(ioi[iprf].Element.B, iom[iprf].Element.B);
+      const int t4 = MIN(t3, Kiod.Element.B);
+      ifer->_c     = MIN(ifer->_c, t4);  
+   }
+   
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   // Epilogue
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   
+   // Finish updating alignment positions
+   alignment->JAL1 = Fpos.Element.One;
+   alignment->JAL2 = Fpos.Element.Two;
+   alignment->JALB = Fpos.Element.B;
+   
+   // Entry and exit from protected regions
+   iom[N1-1].Element.One = MIN(iom[N1-1].Element.One, In);
+   iom[N1-1].Element.Two = In;
+   
+   for (int iprf=N1; iprf<N2; ++iprf) {
+      iom[iprf].Element.One = MIN(iom[iprf].Element.One, In);
+      iom[iprf].Element.Two = In;
+   
+      ioi[iprf].Element.One = MIN(ioi[iprf].Element.One, In);
+      ioi[iprf].Element.Two = In;
+   }  
+   
+#ifdef XALIP_DEBUG
+   for (int iprf=0; iprf<=prf->Length; ++iprf) {
+      printf("NEXTR IOP %4.4i %15i %15i %15i\n", iprf, iop[iprf].Element[MATCH], iop[iprf].Element[INSERTION],
+             iop[iprf].Element[DELETION]);
+      printf("NEXTR IOM %4.4i %15i %15i %15i\n", iprf, iom[iprf].Element.One, iom[iprf].Element.Two,
+             iom[iprf].Element.B);
+      printf("NEXTR IOI %4.4i %15i %15i %15i\n", iprf, ioi[iprf].Element.One, ioi[iprf].Element.Two,
+             ioi[iprf].Element.B);
+      
+   }
+   
+   printf("NEXTR ALIGN %4i %4i %4i %4i %4i\n",
+                   alignment->JAL1, alignment->JAL2, alignment->JALS, alignment->JALB, alignment->JALE);
+#endif
+}
+
+int xalip_sse41( const struct Profile * const restrict prf, const unsigned char * const restrict Sequence,
+           union lScores * const restrict iop, union Positions * const restrict iom,
+           union Positions * const restrict ioi, const size_t bseq, const size_t lseq,
+           struct Alignment * const restrict alignment,
+           _Bool * const restrict Lock, const size_t N1, const size_t N2, const _Bool Lopt,
+           const int kcut, const size_t NALI)
+{
+   int iseq;
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   // Prelogue
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   
+   // Alignment list
+   int iopt = NLOW;
+   size_t nali = 0;
+   
+   // Search control fields
+   int ibeg    = bseq-1;
+   size_t jlcp = prf->Length / 2;
+   int nsca    = 0;
+   
+   // Stack Memory
+   struct Minima ifer __attribute__((aligned(16)));
+   
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   // Two step forward one step backward loop
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   MajorLoop:
+   
+   iseq = ibeg;
+   struct Alignment lAlignment;
+   lAlignment.JALS = NLOW;
+   lAlignment.JAL1 = 0;
+   lAlignment.JAL2 = 0;
+   lAlignment.JALB = 0;
+   lAlignment.JALE = 0;
+   
+   // Initiate work array
+   InitR(iseq, N1, N2, bseq, lseq, iop, iom, ioi, prf);
+#ifdef XALIP_DEBUG
+   for (size_t i=0; i<=prf->Length; ++i) {
+      printf("IOP %8i %8i %8i %8i\n",
+             iop[i].Element[MATCH], iop[i].Element[INSERTION], iop[i].Element[DELETION],
+             iop[i].Element.dummy);
+      printf("IOM %8i %8i %8i %8i\n",
+             iom[i].Element.One, iom[i].Element.Two, iom[i].Element.B,
+             iom[i].Element.dummy);
+      printf("IOI %8i %8i %8i %8i\n",
+             ioi[i].Element.One, ioi[i].Element.Two, ioi[i].Element.B,
+             ioi[i].Element.dummy);          
+   }
+#endif
+   
+   // Initiate search control values
+   int ilcp = iseq;
+   int ifcp = iseq+1;
+   int nlcp = ilcp + jlcp;
+   
+   // Move one sequence position forward
+   ++iseq;
+   
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   // Loop over sequence positions
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   SeqPosLoop:
+   {
+      ++nsca;
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Update work array
+      if (iseq < lseq ) {
+      #pragma noinline
+         nextR(prf, Sequence, iseq, iop, iom, ioi, lseq, &lAlignment,&ifer, Lock[iseq], N1, N2);
+      } else {
+      #pragma noinline
+         nextR_last(prf, Sequence, iseq, iop, iom, ioi, lseq, &lAlignment,&ifer, Lock[iseq], N1, N2);      
+      }
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // If Match found
+      if (lAlignment.JALS >= kcut) {
+         // Determine firdst entry of current row
+         if ( (ifer._a > lAlignment.JAL2) || (iseq == lseq) ) {
+            // Fill in missing alignment data
+            lAlignment.JAL1 = lAlignment.JAL1 == 0 ? lAlignment.JALB : lAlignment.JAL1;
+            lAlignment.JAL2 = lAlignment.JAL2 == 0 ? iseq            : lAlignment.JAL2;
+            
+            // Check for errors
+            if (lAlignment.JAL2 < lAlignment.JAL1) {
+               fputs("Error: Illegal alignment found - no list produced.\n", stderr);
+               return -1;
+            }
+            
+            if (++nali > NALI) {
+               fputs("Warning: Too many alignments found - list may be incomplete.\n", stderr);
+               return -2;
+            } 
+            
+            // Accept alignment
+            struct Alignment * pAlignment = &alignment[nali];
+            pAlignment->JALS = lAlignment.JALS;
+            pAlignment->JALB = lAlignment.JALB;
+            pAlignment->JAL1 = lAlignment.JAL1;
+            pAlignment->JAL2 = lAlignment.JAL2;
+            pAlignment->JALE = lAlignment.JALE;
+#ifdef XALIP_DEBUG
+            printf("XALIP ALIGN %lu %4.4i %4.4i %4.4i %4.4i %4.4i\n",nali,
+                   lAlignment.JAL1, lAlignment.JAL2, lAlignment.JALS, lAlignment.JALB, lAlignment.JALE);
+#endif   
+            // Protect sequence region
+            for (int jseq=lAlignment.JAL1; jseq<=lAlignment.JAL2; ++jseq) {
+               Lock[jseq] = true;
+            } 
+            
+            // Exit if only searching for optimal alignment
+            if (nali>0 && Lopt) 
+               return nali;
+            else 
+               goto MajorLoop;
+         } else {
+            if ( ++iseq <= lseq ) goto SeqPosLoop;
+         }
+      } else {
+         // Have we reached next check point ?
+         if (iseq >= nlcp) {
+            // Determine firdst entry of current row
+            if (ifer._b >= ilcp) { 
+               ibeg = ifcp - 1;
+               ifcp = ifer._c;
+               ilcp = iseq;
+            }
+            
+            // Calculate next check point
+            nlcp += jlcp;
+         }
+         
+         // Move one sequence position forward
+         if ( ++iseq <= lseq ) goto SeqPosLoop;
+      }
+   }
+   return nali;
+}
+
diff --git a/src/C/include/config.h b/src/C/include/config.h
new file mode 100644
index 0000000..98c625a
--- /dev/null
+++ b/src/C/include/config.h
@@ -0,0 +1,216 @@
+/* src/C/include/config.h.  Generated from config.h.in by configure.  */
+/* src/C/include/config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
+   systems. This function is required for `alloca.c' support on those systems.
+   */
+/* #undef CRAY_STACKSEG_END */
+
+/* Define to 1 if using `alloca.c'. */
+/* #undef C_ALLOCA */
+
+/* Define to 1 if you have `alloca', as a function or macro. */
+#define HAVE_ALLOCA 1
+
+/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
+   */
+#define HAVE_ALLOCA_H 1
+
+/* Define to 1 if you have the `bindprocessor' function. */
+/* #undef HAVE_BINDPROCESSOR */
+
+/* Define if CPU_SET and CPU_ZERO defined */
+#define HAVE_CPU_SET_MACROS 1
+
+/* Define if cpu_set_t is defined in sched.h */
+#define HAVE_CPU_SET_T 1
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#define HAVE_FCNTL_H 1
+
+/* Define to 1 if you have the `fseek' function. */
+#define HAVE_FSEEK 1
+
+/* Define to 1 if you have the `ftell' function. */
+#define HAVE_FTELL 1
+
+/* Define to 1 if you have the `getpagesize' function. */
+#define HAVE_GETPAGESIZE 1
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#define HAVE_GETTIMEOFDAY 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the `m' library (-lm). */
+#define HAVE_LIBM 1
+
+/* Define to 1 if you have the <limits.h> header file. */
+#define HAVE_LIMITS_H 1
+
+/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
+   to 0 otherwise. */
+#define HAVE_MALLOC 0
+
+/* Define to 1 if you have the <mathimf.h> header file. */
+/* #undef HAVE_MATHIMF_H */
+
+/* Define to 1 if you have the `memcpy' function. */
+#define HAVE_MEMCPY 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+/* #undef HAVE_MEMORY_H */
+
+/* Define to 1 if you have the `memset' function. */
+#define HAVE_MEMSET 1
+
+/* Define to 1 if you have a working `mmap' system call. */
+/* #undef HAVE_MMAP */
+
+/* Define to 1 if you have the <mm_malloc.h> header file. */
+#define HAVE_MM_MALLOC_H 1
+
+/* Define to 1 if you have the `munmap' function. */
+#define HAVE_MUNMAP 1
+
+/* Define is the OSX thread affinity policy macros defined */
+/* #undef HAVE_OSX_THREAD_AFFINITY */
+
+/* Define if you have POSIX threads libraries and header files. */
+/* #undef HAVE_PTHREAD */
+
+/* Define if pthread_{,attr_}{g,s}etaffinity_np is supported. */
+#define HAVE_PTHREAD_AFFINITY_NP 1
+
+/* Have PTHREAD_PRIO_INHERIT. */
+/* #undef HAVE_PTHREAD_PRIO_INHERIT */
+
+/* Define to 1 if you have the `sched_getaffinity' function. */
+#define HAVE_SCHED_GETAFFINITY 1
+
+/* Define to 1 if you have the `sched_setaffinity' function. */
+#define HAVE_SCHED_SETAFFINITY 1
+
+/* Define to 1 if stdbool.h conforms to C99. */
+#define HAVE_STDBOOL_H 1
+
+/* 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. */
+#define HAVE_STDLIB_H 1
+
+/* 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. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strtol' function. */
+#define HAVE_STRTOL 1
+
+/* 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/stat.h> header file. */
+/* #undef HAVE_SYS_STAT_H */
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#define HAVE_SYS_TIME_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+/* #undef HAVE_SYS_TYPES_H */
+
+/* Define to 1 if you have the `thread_policy_set' function. */
+/* #undef HAVE_THREAD_POLICY_SET */
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define to 1 if the system has the type `_Bool'. */
+#define HAVE__BOOL 1
+
+/* Define to 1 if your C compiler doesn't accept -c and -o together. */
+/* #undef NO_MINUS_C_MINUS_O */
+
+/* Name of package */
+#define PACKAGE "pftools"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT "thierry.schuepbach at isb-sib.ch"
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "PfTools"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "PfTools 3.0"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "pftools"
+
+/* Define to the home page for this package. */
+#define PACKAGE_URL ""
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "3.0"
+
+/* Define to necessary symbol if this constant uses a non-standard name on
+   your system. */
+/* #undef PTHREAD_CREATE_JOINABLE */
+
+/* If using the C implementation of alloca, define if you know the
+   direction of stack growth for your system; otherwise it will be
+   automatically deduced at runtime.
+	STACK_DIRECTION > 0 => grows toward higher addresses
+	STACK_DIRECTION < 0 => grows toward lower addresses
+	STACK_DIRECTION = 0 => direction of growth unknown */
+/* #undef STACK_DIRECTION */
+
+/* Define to 1 if you have the ANSI C header files. */
+/* #undef STDC_HEADERS */
+
+/* Version number of package */
+#define VERSION "3.0"
+
+/* Define to empty if `const' does not conform to ANSI C. */
+/* #undef const */
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+#define gid_t int
+
+/* 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 rpl_malloc if the replacement function should be used. */
+#define malloc rpl_malloc
+
+/* Define to `long int' if <sys/types.h> does not define. */
+/* #undef off_t */
+
+/* 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.  */
+#define restrict __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 `int' if <sys/types.h> doesn't define. */
+#define uid_t int
+
+/* 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/C/include/config.h.in b/src/C/include/config.h.in
new file mode 100644
index 0000000..6edd170
--- /dev/null
+++ b/src/C/include/config.h.in
@@ -0,0 +1,215 @@
+/* src/C/include/config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
+   systems. This function is required for `alloca.c' support on those systems.
+   */
+#undef CRAY_STACKSEG_END
+
+/* Define to 1 if using `alloca.c'. */
+#undef C_ALLOCA
+
+/* Define to 1 if you have `alloca', as a function or macro. */
+#undef HAVE_ALLOCA
+
+/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
+   */
+#undef HAVE_ALLOCA_H
+
+/* Define to 1 if you have the `bindprocessor' function. */
+#undef HAVE_BINDPROCESSOR
+
+/* Define if CPU_SET and CPU_ZERO defined */
+#undef HAVE_CPU_SET_MACROS
+
+/* Define if cpu_set_t is defined in sched.h */
+#undef HAVE_CPU_SET_T
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H
+
+/* Define to 1 if you have the `fseek' function. */
+#undef HAVE_FSEEK
+
+/* Define to 1 if you have the `ftell' function. */
+#undef HAVE_FTELL
+
+/* Define to 1 if you have the `getpagesize' function. */
+#undef HAVE_GETPAGESIZE
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#undef HAVE_GETTIMEOFDAY
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the `m' library (-lm). */
+#undef HAVE_LIBM
+
+/* Define to 1 if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
+
+/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
+   to 0 otherwise. */
+#undef HAVE_MALLOC
+
+/* Define to 1 if you have the <mathimf.h> header file. */
+#undef HAVE_MATHIMF_H
+
+/* Define to 1 if you have the `memcpy' function. */
+#undef HAVE_MEMCPY
+
+/* 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 a working `mmap' system call. */
+#undef HAVE_MMAP
+
+/* Define to 1 if you have the <mm_malloc.h> header file. */
+#undef HAVE_MM_MALLOC_H
+
+/* Define to 1 if you have the `munmap' function. */
+#undef HAVE_MUNMAP
+
+/* Define is the OSX thread affinity policy macros defined */
+#undef HAVE_OSX_THREAD_AFFINITY
+
+/* Define if you have POSIX threads libraries and header files. */
+#undef HAVE_PTHREAD
+
+/* Define if pthread_{,attr_}{g,s}etaffinity_np is supported. */
+#undef HAVE_PTHREAD_AFFINITY_NP
+
+/* Have PTHREAD_PRIO_INHERIT. */
+#undef HAVE_PTHREAD_PRIO_INHERIT
+
+/* Define to 1 if you have the `sched_getaffinity' function. */
+#undef HAVE_SCHED_GETAFFINITY
+
+/* Define to 1 if you have the `sched_setaffinity' function. */
+#undef HAVE_SCHED_SETAFFINITY
+
+/* 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 <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 `strtol' function. */
+#undef HAVE_STRTOL
+
+/* 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/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 `thread_policy_set' function. */
+#undef HAVE_THREAD_POLICY_SET
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if the system has the type `_Bool'. */
+#undef HAVE__BOOL
+
+/* Define to 1 if your C compiler doesn't accept -c and -o together. */
+#undef NO_MINUS_C_MINUS_O
+
+/* 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 to necessary symbol if this constant uses a non-standard name on
+   your system. */
+#undef PTHREAD_CREATE_JOINABLE
+
+/* If using the C implementation of alloca, define if you know the
+   direction of stack growth for your system; otherwise it will be
+   automatically deduced at runtime.
+	STACK_DIRECTION > 0 => grows toward higher addresses
+	STACK_DIRECTION < 0 => grows toward lower addresses
+	STACK_DIRECTION = 0 => direction of growth unknown */
+#undef STACK_DIRECTION
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Version number of package */
+#undef VERSION
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+#undef gid_t
+
+/* 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 rpl_malloc if the replacement function should be used. */
+#undef malloc
+
+/* Define to `long int' if <sys/types.h> does not define. */
+#undef off_t
+
+/* 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 `int' if <sys/types.h> doesn't define. */
+#undef uid_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/C/include/profile.h b/src/C/include/profile.h
new file mode 100644
index 0000000..8d1e7d4
--- /dev/null
+++ b/src/C/include/profile.h
@@ -0,0 +1,737 @@
+#ifndef _PROFILE_H
+#define _PROFILE_H
+#include <stdio.h> 
+#include <stdbool.h>
+#include <string.h>
+#include <xmmintrin.h>
+#include <mm_malloc.h>
+#include <alloca.h>
+
+#define ALPHABET              "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+#define ALPHABET_SIZE 		26
+#define TRANSITION_SIZE 	9
+#define PROFILE_MAX_LINE_SIZE   512
+
+#define KDIS                    2
+#define KDPM                    2
+
+#define MAXN                    8
+#define KNOR                    3
+#define KNPM                    5
+
+#define MAXC                    8
+
+#define NLOW                    -16383
+
+/************************** Insertion Matrices ************************
+ * There are 3 different matrices for:
+ *    - alphabet
+ *    - boundaries
+ *    - transitions
+ */
+#define _D   ALPHABET_SIZE+1
+
+/* BOUNDARIES */
+#define _B0  0
+#define _B1  1
+
+#define _E0  2
+#define _E1  3
+
+#define _BM  4
+#define _BI  5
+#define _BD  6
+#define _BE  7
+
+#define _ME  8
+#define _IE  9
+#define _DE 10
+
+#define INSERTION_BOUNDARIES_SIZE 11
+
+/* TRANSITIONS */
+////////////////////////////// FOR SSE2 to WORK //////////////////////////////////////////////
+// WARNING: MATCH=2,INSERTION=3,DELETION=0,DUMMY=1
+enum VectorPosition {
+  /* Positions within both 4-tuple and array of 4-tuple */ 
+  MATCH=2,
+  INSERTION=3,
+  DELETION=0,
+  EXTRA=1,
+  /* Position of empty space within 4-tuple */
+  DUMMY=1,
+  /* Positions of transition from ? to ? within array of 4-tuples */
+  _MM = 4*MATCH+MATCH,     _MI = 4*MATCH+INSERTION,     _MD = 4*MATCH+DELETION,     _MX    = 4*MATCH+EXTRA,
+  _IM = 4*INSERTION+MATCH, _II = 4*INSERTION+INSERTION, _ID = 4*INSERTION+DELETION, _IX    = 4*INSERTION+EXTRA,
+  _DM = 4*DELETION+MATCH,  _DI = 4*DELETION+INSERTION,  _DD = 4*DELETION+DELETION,  _DX    = 4*DELETION+EXTRA,
+  _XM = 4*EXTRA+MATCH,     _XI = 4*EXTRA+INSERTION,     _XD = 4*EXTRA+DELETION,     _DUMMY = 4*EXTRA+EXTRA,
+  /* Overall Size of transtion structure */
+  INSERTION_TRANSITIONS_SIZE = 16 
+} VectorPosition ;
+////////////////////////////// FOR SSE4.1 to WORK //////////////////////////////////////////////
+// WARNING: MATCH and INSERTION should be next to each other (in this ordering) 
+//          and either in the upper part of xmm or the lower part.
+//          Do no mix them and correct the storing function according to your above choice.
+static inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) 
+StoreMatchInsertion( __m64 * const _address, const __m128 _reg)
+{
+    //_mm_storel_pi(_address, _reg);
+    _mm_storeh_pi(_address, _reg);
+}
+
+typedef union {
+    struct { float M; float I; } Elementf;
+    struct { int M; int I; } Element;
+    __m64 mm;
+  } sIOP;
+  
+typedef union ScoreTuple {
+  short int To[4];
+  short int From[4];
+  __m64 mm;
+} ScoreTuple;
+
+typedef union {
+  ScoreTuple From[4];
+  short int Element[INSERTION_TRANSITIONS_SIZE];
+} TransitionScores;
+
+typedef struct InsertionScores {
+  short int * Alphabet;
+  short int * Boundaries;
+  TransitionScores * Transitions;
+  ScoreTuple * FirstSequenceProtein;
+  ScoreTuple * LastSequenceProtein;
+} struct_InsertionScores;
+
+/************************** Match Matrix   ************************/
+typedef struct MatchScores {
+  short int * alphabet;
+} struct_MatchScores;
+
+
+typedef struct Disjoint {
+  char CDIS[KDIS][16];
+  int  JDIP[KDIS];
+  int  NDIP[KDPM];
+  int  MDIS;
+} SDisjoint;
+
+typedef struct NormalizationItem {
+  float RNOP[KNPM];
+  char  CNTX[32];
+  int   MNOR;
+  int   NNOR;
+  int   NNPR;
+} SNormalizationItem;
+
+typedef struct Normalization {
+  SNormalizationItem Values[MAXN];
+  char  CNOR[KNOR][16];
+  int   JNOP[KNOR];
+  int   JNOR;
+} SNormalization;
+
+typedef struct Average {
+  float * Weights;
+  size_t size;
+} SAverage;
+
+typedef int (*NormalizedToRawFunctionPtr)(const float, const size_t, const float);
+typedef float (*RawToNormalizedFunctionPtr)(const int, const size_t, const float);
+
+typedef struct CutOffItem {
+  char  CCUT[32];
+  float RCUT[MAXN];
+  int   MCUT[MAXN];
+  int   MCLE;
+  int   ICUT;			// Filter cutoff
+  unsigned int	HCUT;		// Heuristic cutoff
+  int   JCNM;
+} SCutOffItem;
+
+typedef struct CutOff {
+  SCutOffItem Values[MAXC];
+  int JCUT;
+} SCutOff;
+
+struct Profile {
+  char Identification[64] __attribute__((aligned(16)));
+  char AC_Number[64] __attribute__((aligned(16)));
+  char Date[128] __attribute__((aligned(16)));
+  char Description[256] __attribute__((aligned(16)));
+  unsigned char Alphabet_Mapping[ALPHABET_SIZE+2] __attribute__((aligned(16)));
+  char CABC[ALPHABET_SIZE+2]; 
+  size_t Length;
+  size_t Alphabet_Length;
+  
+  union Scores {
+    struct SInsertion {
+      short int * Alphabet;
+      short int * Boundaries;
+      TransitionScores * Transitions;
+      ScoreTuple * FirstSequenceProtein;
+      ScoreTuple * LastSequenceProtein;
+      size_t AlignStep;
+      struct_MatchScores _dummy;
+    } Insertion;
+    struct SMatch {
+      struct_InsertionScores _dummy;
+      size_t AlignStep;
+      short int * Alphabet;
+    } Match;
+  } Scores;
+
+  _Bool isCircular;
+  SNormalization NormalizationData;
+  SDisjoint DisjointData;
+  SCutOff CutOffData;
+  size_t Level;		/* WARNING: This is not the real level but the index corresponding within the cutoff array */
+  size_t Mode;          /* WARNING: This is not the real mode but the index corresponding within the normalization array */
+};
+
+typedef struct PFSequence {
+  unsigned char * ProfileIndex;
+  size_t Length;
+} PFSequence;
+
+/******************* XALIP & XALIT structures *******************/
+union Positions {
+  struct {
+    int One;
+    int Two;
+    int B;
+    int dummy;
+  } Element;
+  __m128i xmm;
+};
+
+union lScores {
+  /* SSE 4.1 can work on integer */
+  int Element[4];
+  __m128i xmm;
+  /* Other have to rely upon float */
+  float Elementf[4];
+  __m128 xmmf;
+};
+
+struct Alignment {
+   int JALS,JALB,JAL1,JAL2,JALE,IPMB,IPME;
+};
+
+
+/******************* Global variables *******************/
+extern SNormalizationItem * Normalization;
+extern NormalizedToRawFunctionPtr NormalizedToRawFunction;
+extern RawToNormalizedFunctionPtr RawToNormalizedFunction;
+extern SAverage * Average;
+extern unsigned int OutputPrintWidth;
+extern int SearchLevel;
+
+/****************** Inline functions *******************/
+
+static inline void InitializeDefault(union Scores * const matrices, char * const MatchSymbol,
+				     char * const InsertionSymbol )
+{
+  /* MATCHES */
+  memset(matrices->Match.Alphabet, 0, (ALPHABET_SIZE+2)*sizeof(short int));
+  /* INSERTIONS */   
+  memset(matrices->Insertion.Alphabet,    0, (ALPHABET_SIZE+2)*sizeof(short int));
+  memset(matrices->Insertion.Boundaries,  0, (INSERTION_BOUNDARIES_SIZE)*sizeof(short int));
+  memset(matrices->Insertion.Transitions, 0, sizeof(TransitionScores));
+
+  matrices->Insertion.Boundaries[_BI] = NLOW;
+  matrices->Insertion.Boundaries[_BD] = NLOW;
+  matrices->Insertion.Boundaries[_BE] = NLOW;
+  matrices->Insertion.Boundaries[_DE] = NLOW;
+  matrices->Insertion.Boundaries[_IE] = NLOW;
+
+  matrices->Insertion.Transitions->Element[_MI] = NLOW;
+  matrices->Insertion.Transitions->Element[_MD] = NLOW;
+  matrices->Insertion.Transitions->Element[_ID] = NLOW;
+  matrices->Insertion.Transitions->Element[_IM] = NLOW;
+  matrices->Insertion.Transitions->Element[_DM] = NLOW;
+  matrices->Insertion.Transitions->Element[_DI] = NLOW;
+  
+  *MatchSymbol = 'X';
+  *InsertionSymbol = '-';
+}
+
+static inline size_t AllocateScores(union Scores * const matrices, const size_t Alphabet_Length, const size_t Profile_Length)
+{
+  register void * ptr;
+  const size_t Aligned_Alphabet_Length = (Alphabet_Length+2 + 15) & ~15 ;
+  matrices->Insertion.AlignStep = Aligned_Alphabet_Length;
+
+  ptr =  _mm_malloc(Aligned_Alphabet_Length*(Profile_Length+1)*sizeof(short int), 64);
+  if (ptr == NULL) return 1;
+  matrices->Match.Alphabet = (short int *) ptr;
+
+  ptr =  _mm_malloc(Aligned_Alphabet_Length*(Profile_Length+1)*sizeof(short int), 64);
+  if (ptr == NULL) return 1;
+  matrices->Insertion.Alphabet = (short int *) ptr;
+
+  ptr =  _mm_malloc(INSERTION_BOUNDARIES_SIZE*(Profile_Length+1)*sizeof(short int), 64);
+  if (ptr == NULL) return 1;
+  matrices->Insertion.Boundaries  = (short int *) ptr;
+
+  ptr =  _mm_malloc((Profile_Length+1)*sizeof(TransitionScores), 64);
+   if (ptr == NULL) return 1;
+  matrices->Insertion.Transitions = (TransitionScores *) ptr;
+
+  ptr =  _mm_malloc((Profile_Length+1)*sizeof(ScoreTuple), 64);
+  if (ptr == NULL) return 1;
+  matrices->Insertion.FirstSequenceProtein = (ScoreTuple *) ptr;
+  
+  ptr =  _mm_malloc((Profile_Length+1)*sizeof(ScoreTuple), 64);
+  if (ptr == NULL) return 1;
+  matrices->Insertion.LastSequenceProtein = (ScoreTuple *) ptr;
+
+  return 0;
+}
+
+static unsigned char TranslateCharToIndex(const char letter, const unsigned char * restrict const Alphabet)
+{
+  const unsigned char lletter = (unsigned char) letter;
+  register size_t index = (size_t) ( ( lletter >= (unsigned char) 'a' ) ? lletter - ((unsigned char) 'a' - (unsigned char) 'A') : lletter );
+  if ( index >= (size_t) 'A' && index <= (size_t) 'Z' ) {
+    return Alphabet[index - (size_t) 'A'];
+  } else {
+    return 0;
+  }
+}
+
+static PFSequence * TranslateSequenceToIndex(PFSequence * const Sequence, const unsigned char * restrict const Alphabet)
+{
+  unsigned char * restrict const CharPtr = Sequence->ProfileIndex;
+  register size_t counter = 0;
+  
+  for (size_t i=0; i<Sequence->Length; ++i) {
+    register size_t index = (size_t) ( ( CharPtr[i] >= (unsigned char) 'a' ) ? CharPtr[i] - ((unsigned char) 'a' - (unsigned char) 'A') : CharPtr[i] );
+    if ( index >= (size_t) 'A' && index <= (size_t) 'Z' ) {
+      CharPtr[counter++] = Alphabet[index - (size_t) 'A'];
+    }
+  }
+
+  Sequence->Length = counter;
+
+  return Sequence;
+}
+
+#ifndef _SPECIAL_HEURISTIC_
+static inline const int * TransposeAndConvertMatchMatrix(const union Scores * const Matrices, const size_t Alphabet_Length,
+                                                         const size_t Profile_Length)
+{
+  const size_t step = Matrices->Match.AlignStep;
+  // Profile size rounded to cache line
+  const size_t Aligned_Profile_Length = (Profile_Length+1 + 15) & ~15;
+  int * restrict const TIMatch = _mm_malloc(Aligned_Profile_Length*Alphabet_Length*sizeof(int),64);
+  
+  if (TIMatch == NULL) return TIMatch;
+  memset(TIMatch, 0, Aligned_Profile_Length*Alphabet_Length*sizeof(int));
+  const register short * restrict lMatch = Matrices->Match.Alphabet;
+  for (size_t iprf = 0; iprf<Profile_Length; ++iprf) {
+    for (size_t alpha=0; alpha <Alphabet_Length; ++alpha) {
+      TIMatch[alpha*Aligned_Profile_Length+iprf] = (int) lMatch[alpha];
+    }
+    lMatch += step;
+  }
+  return TIMatch;
+}
+
+static inline void TransposeAndConvertMatchMatrixGivenMemory(int * const restrict TIMatch, const union Scores * const Matrices,
+							     const size_t Alphabet_Length, const size_t Profile_Length,
+							     const size_t Aligned_Profile_Length)
+{
+  const size_t step = Matrices->Match.AlignStep;
+ 
+  memset(TIMatch, 0, Aligned_Profile_Length*Alphabet_Length*sizeof(int));
+  const register short * restrict lMatch = Matrices->Match.Alphabet;
+  for (size_t iprf = 0; iprf<Profile_Length; ++iprf) {
+    for (size_t alpha=0; alpha <Alphabet_Length; ++alpha) {
+      TIMatch[alpha*Aligned_Profile_Length+iprf] = (int) lMatch[alpha];
+    }
+    lMatch += step;
+  }
+}
+
+static inline float * TransposeAndConvertToFloatMatchMatrix(const union Scores * const Matrices, const size_t Alphabet_Length,
+                                                            const size_t Profile_Length)
+{
+  const size_t step = Matrices->Match.AlignStep;
+  // Profile size rounded to cache line boundary
+  const size_t Aligned_Profile_Length = (Profile_Length+1 + 15) & ~15;
+  float * restrict const TFMatch = _mm_malloc(Aligned_Profile_Length*Alphabet_Length*sizeof(float),64);
+ 
+  if (TFMatch == NULL) return TFMatch;
+  memset(TFMatch, 0, Aligned_Profile_Length*Alphabet_Length*sizeof(float));
+  
+  const register short * restrict lMatch = Matrices->Match.Alphabet;
+  for (size_t iprf = 0; iprf<Profile_Length; ++iprf) {
+    for (size_t alpha=0; alpha <Alphabet_Length; ++alpha) {
+      TFMatch[alpha*Aligned_Profile_Length+iprf] = (float) lMatch[alpha];
+    }
+    lMatch += step;
+  }
+  return TFMatch;
+}
+
+static inline void TransposeAndConvertToFloatMatchMatrixGivenMemory(float * const restrict TIMatch, const union Scores * const Matrices,
+							            const size_t Alphabet_Length, const size_t Profile_Length,
+							            const size_t Aligned_Profile_Length)
+{
+  const size_t step = Matrices->Match.AlignStep;
+
+  memset(TIMatch, 0, Aligned_Profile_Length*Alphabet_Length*sizeof(int));
+  
+  const register short * restrict lMatch = Matrices->Match.Alphabet;
+  for (size_t iprf = 0; iprf<Profile_Length; ++iprf) {
+    for (size_t alpha=0; alpha <Alphabet_Length; ++alpha) {
+      TIMatch[alpha*Aligned_Profile_Length+iprf] = (float) lMatch[alpha];
+    }
+    lMatch += step;
+  }
+}
+#else
+/* 
+ * These are special heuristic functions in the sense the limit negative effect of wrong match
+ * replacing them where benefical by either an insertion or deletion score.
+ * 
+ */
+
+#define CHANGE(type) \
+  const register short * restrict lMatch = Matrices->Match.Alphabet;\
+  const TransitionScores * restrict InsertionLine = Matrices->Insertion.Transitions;\
+  \
+  /* First line stay identical */\
+  for (size_t alpha=0; alpha <Alphabet_Length; ++alpha) {\
+    TIMatch[alpha*Aligned_Profile_Length] = (type) lMatch[alpha];\
+  }\
+  lMatch += step;\
+  /* from 1 to n-1 we use special treatment */\
+  for (size_t iprf = 1; iprf<Profile_Length-1; ++iprf) {\
+    const short int MDDM    = InsertionLine[iprf].From[MATCH].To[DELETION]+InsertionLine[iprf+1].From[DELETION].To[MATCH];\
+    const short int MIIM    = InsertionLine[iprf].From[MATCH].To[INSERTION]+InsertionLine[iprf+1].From[INSERTION].To[MATCH];\
+    const short int Minimum = (MDDM>MIIM) ? MDDM : MIIM;\
+    \
+    for (size_t alpha=0; alpha <Alphabet_Length; ++alpha) {\
+      const short int value = lMatch[alpha] < Minimum ? Minimum : lMatch[alpha];\
+      TIMatch[alpha*Aligned_Profile_Length+iprf] = (type) value;\
+    }\
+    lMatch += step;\
+  }\
+  /* Last line */\
+  for (size_t alpha=0; alpha <Alphabet_Length; ++alpha) {\
+    TIMatch[alpha*Aligned_Profile_Length+Profile_Length-1] = (type) lMatch[alpha];\
+  }
+  
+static inline const int * TransposeAndConvertMatchMatrix(const union Scores * const Matrices, const size_t Alphabet_Length,
+                                                         const size_t Profile_Length)
+{
+  const size_t step = Matrices->Match.AlignStep;
+  // Profile size rounded to cache line
+  const size_t Aligned_Profile_Length = (Profile_Length+1 + 15) & ~15;
+  int * restrict const TIMatch = _mm_malloc(Aligned_Profile_Length*Alphabet_Length*sizeof(int),64);
+  
+  if (TIMatch == NULL) return TIMatch;
+  memset(TIMatch, 0, Aligned_Profile_Length*Alphabet_Length*sizeof(int));
+  
+  CHANGE(int);
+
+  return TIMatch;
+}
+
+static inline void TransposeAndConvertMatchMatrixGivenMemory(int * const restrict TIMatch, const union Scores * const Matrices,
+							     const size_t Alphabet_Length, const size_t Profile_Length,
+							     const size_t Aligned_Profile_Length)
+{
+  const size_t step = Matrices->Match.AlignStep;
+ 
+  memset(TIMatch, 0, Aligned_Profile_Length*Alphabet_Length*sizeof(int));
+  CHANGE(int);
+}
+
+static inline float * TransposeAndConvertToFloatMatchMatrix(const union Scores * const Matrices, const size_t Alphabet_Length,
+							    const size_t Profile_Length)
+{
+  const size_t step = Matrices->Match.AlignStep;
+  // Profile size rounded to cache linerices
+  const size_t Aligned_Profile_Length = (Profile_Length+1 + 15) & ~15;
+  float * restrict const TIMatch = _mm_malloc(Aligned_Profile_Length*Alphabet_Length*sizeof(float),64);
+ 
+  if (TIMatch == NULL) return TIMatch;
+  memset(TIMatch, 0, Aligned_Profile_Length*Alphabet_Length*sizeof(float));
+  
+  CHANGE(float);
+
+  return TIMatch;
+}
+
+static inline void TransposeAndConvertToFloatMatchMatrixGivenMemory(float * const restrict TIMatch, const union Scores * const Matrices,
+							            const size_t Alphabet_Length, const size_t Profile_Length,
+							            const size_t Aligned_Profile_Length)
+{
+  const size_t step = Matrices->Match.AlignStep;
+
+  memset(TIMatch, 0, Aligned_Profile_Length*Alphabet_Length*sizeof(float));
+  
+  CHANGE(float);
+}
+#endif
+
+static inline void WeightMatchMatrix(float * const restrict TIMatch, const struct Profile * prf,
+				     const size_t Alphabet_Length, const size_t Profile_Length)
+{
+  float DatabaseWeightedScores[] = { 
+    0.0783f, 0.0000f, 0.0236f, 0.0496f, 0.0581f, 0.0463f, 0.0749f, 0.0248f,
+    0.0621f, 0.0000f, 0.0602f, 0.0939f, 0.0251f, 0.0421f, 0.0000f, 0.0426f,
+    0.0360f, 0.0524f, 0.0612f, 0.0523f, 0.0000f, 0.0700f, 0.0132f, 0.0000f,
+    0.0339f, 0.0000f
+  };
+  
+  /* 
+   * Allocate on the stack a Database scaling factor for each letter in profile alphabet
+   * alphabet + 1 (+1 is for the zero position being the unknown)
+   */
+  float * const restrict DatabaseFactor = (float*) alloca((Alphabet_Length)*sizeof(float));
+  for (size_t alpha=0; alpha<Alphabet_Length; ++alpha) {
+    const unsigned char letter = (unsigned char) prf->CABC[alpha];
+    register size_t index = (size_t) ( (letter >= (unsigned char) 'a' ) ? letter - ((unsigned char) 'a') : letter - ((unsigned char) 'A') );
+    
+//     fprintf(stderr,"Alphabet %lu : %1c\t%lu\n",alpha,prf->CABC[alpha],index);
+    if ( index < 26 ) {
+      DatabaseFactor[alpha] = DatabaseWeightedScores[index];
+    } else {
+      fprintf(stderr,"Database weight scores does not contain all alphabet letters, %1c is missing\n", prf->CABC[alpha]);
+      exit(1);
+    }
+    
+  }
+  /* Alignment of profile pn cache line (64 bytes) */
+  const size_t Aligned_Profile_Length = (Profile_Length+1 + 15) & ~15;
+  
+  /* We allocate here on the stack, so beware */
+  //float * const restrict AlphabetSum = (float*) alloca(Alphabet_Length*sizeof(float));
+  float * const restrict ProfileSum = (float*) alloca(Aligned_Profile_Length*sizeof(float));
+  memset(ProfileSum, 0, Aligned_Profile_Length*sizeof(float));
+  
+  
+  
+  /* Compute overall sum and sum per letter */
+  register float Sum = 0.0f;
+  for (size_t alpha=0; alpha<Alphabet_Length; ++alpha) {
+    register float tSum = 0.0f; 
+    //#pragma unroll(4)
+    //for (size_t iprf = 0; iprf<Profile_Length; ++iprf) tSum += TIMatch[alpha*Aligned_Profile_Length+iprf];
+    //AlphabetSum[alpha] = tSum;
+#pragma unroll(4)
+    for (size_t iprf=0; iprf<Profile_Length; ++iprf) {
+	ProfileSum[iprf] += TIMatch[alpha*Aligned_Profile_Length+iprf];
+	tSum             += TIMatch[alpha*Aligned_Profile_Length+iprf];
+    }
+    Sum += tSum;
+  }
+  
+  /* Normalize factor and include database frequency as well */
+  const register float Norm = 1.0f/Sum;
+//   for (size_t alpha=0; alpha<Alphabet_Length; ++alpha) {
+//     AlphabetSum[alpha] *= Norm*DatabaseFactor[alpha];
+//   }
+  for (size_t iprf = 0; iprf<Profile_Length; ++iprf) ProfileSum[iprf] *= Norm;
+  
+  /* Apply the scaling to the Match matrix */
+  for (size_t alpha=0; alpha<Alphabet_Length; ++alpha) {
+    //const register float scale = AlphabetSum[alpha]; 
+    //#pragma unroll(4)
+    //for (size_t iprf = 0; iprf<Profile_Length; ++iprf) TIMatch[alpha*Aligned_Profile_Length+iprf] *= scale;
+    const register float scale = DatabaseFactor[alpha];
+    for (size_t iprf = 0; iprf<Profile_Length; ++iprf) TIMatch[alpha*Aligned_Profile_Length+iprf] *= (1.0f - ProfileSum[iprf]*scale);
+  }
+}
+
+
+static inline void FreeScores(union Scores * const matrices)
+{
+  if (matrices->Insertion.Alphabet != NULL) _mm_free(matrices->Insertion.Alphabet);
+  if (matrices->Insertion.Boundaries != NULL) _mm_free(matrices->Insertion.Boundaries);
+  if (matrices->Insertion.Transitions != NULL) _mm_free(matrices->Insertion.Transitions);
+  if (matrices->Insertion.FirstSequenceProtein != NULL) _mm_free(matrices->Insertion.FirstSequenceProtein);
+  if (matrices->Insertion.LastSequenceProtein != NULL) _mm_free(matrices->Insertion.LastSequenceProtein);
+  matrices->Insertion.AlignStep = 0;
+  if (matrices->Match.Alphabet != NULL) _mm_free(matrices->Match.Alphabet);
+}
+
+static inline void NextInsertionProfile( struct SInsertion * Insertion)
+{
+  const size_t step       = Insertion->AlignStep;
+  Insertion->Alphabet    += step;
+  Insertion->Boundaries  += INSERTION_BOUNDARIES_SIZE;
+  Insertion->Transitions ++;
+}
+
+static inline void PreviousInsertionProfile( struct SInsertion * Insertion)
+{
+  const size_t step       = Insertion->AlignStep;
+  Insertion->Alphabet    -= step;
+  Insertion->Boundaries  -= INSERTION_BOUNDARIES_SIZE;
+  Insertion->Transitions --; 
+}
+
+static inline void CopyPreviousInsertionProfile(struct SInsertion * Insertion)
+{
+  const size_t step       = Insertion->AlignStep;
+  memcpy(Insertion->Alphabet, Insertion->Alphabet - step, step*sizeof(short int));
+  memcpy(Insertion->Boundaries, Insertion->Boundaries - INSERTION_BOUNDARIES_SIZE, INSERTION_BOUNDARIES_SIZE*sizeof(short int));
+  memcpy(Insertion->Transitions, Insertion->Transitions - 1, sizeof(TransitionScores));
+}
+
+static inline void NextMatchProfile( struct SMatch * Match)
+{
+  const size_t step = Match->AlignStep;
+  Match->Alphabet  += step;
+}
+
+static inline void PreviousMatchProfile( struct SMatch * Match)
+{
+  const size_t step = Match->AlignStep;
+  Match->Alphabet  -= step;
+}
+
+static size_t GetInsertionMemory(const char * const key, struct SInsertion * const Insertion, short int ** pointer)
+{
+  /* return 0 if single value, 1 if vector and 2 if error */
+
+  short int * Alphabet    = Insertion->Alphabet;
+  short int * Boundaries  = Insertion->Boundaries;
+  short int * Transitions = Insertion->Transitions->Element;
+  
+  switch(key[0]) {
+    case 'I':
+      switch(key[1]) {
+        case '\0': *pointer = Alphabet    +   1; return 1; break;
+        case '0' : *pointer = Alphabet    +   0; return 0; break;
+        case 'M' : *pointer = Transitions + _IM; return 0; break;
+        case 'I' : *pointer = Transitions + _II; return 0; break;
+        case 'D' : *pointer = Transitions + _ID; return 0; break;
+        case 'E' : *pointer = Boundaries  + _IE; return 0; break;
+        default  : return 2;
+      };
+      break;
+    case 'B':
+      switch(key[1]) {
+        case '0' : *pointer = Boundaries + _B0; return 0; break;
+        case '1' : *pointer = Boundaries + _B1; return 0; break;
+        case 'M' : *pointer = Boundaries + _BM; return 0; break;
+        case 'I' : *pointer = Boundaries + _BI; return 0; break;
+        case 'D' : *pointer = Boundaries + _BD; return 0; break;
+        case 'E' : *pointer = Boundaries + _BE; return 0; break;
+        default  : return 2;
+      };
+      break;
+    case 'E':
+      switch(key[1]) {
+        case '0' : *pointer = Boundaries + _E0; return 0; break;
+        case '1' : *pointer = Boundaries + _E1; return 0; break;
+        default  : return 2;
+      };
+      break;
+    case 'M':
+      switch(key[1]) {
+        case 'M' : *pointer = Transitions + _MM; return 0; break;
+        case 'I' : *pointer = Transitions + _MI; return 0; break;
+        case 'D' : *pointer = Transitions + _MD; return 0; break;
+	case 'E' : *pointer = Boundaries  + _ME; return 0; break;
+        default  : return 2;
+      };
+      break;
+    case 'D':
+      switch(key[1]) {
+        case 'M' : *pointer = Transitions + _DM; return 0; break;
+        case 'I' : *pointer = Transitions + _DI; return 0; break;
+        case 'D' : *pointer = Transitions + _DD; return 0; break;
+        case 'E' : *pointer = Boundaries  + _DE; return 0; break;
+        default  : return 2;
+      };
+      break;
+    default:
+      return 2;
+  };
+}
+
+int ReadProfile(const char * const restrict FileName, struct Profile * const prf);
+void FreeProfile(struct Profile * const prf);
+int xali1_sse2 (const struct Profile * const restrict prf, const unsigned char * const restrict Sequence,
+                int * const WORK, const size_t BSEQ, const size_t LSEQ, const int CutOff, const _Bool LOPT);
+int xali1_sse41(const struct Profile * const restrict prf, const unsigned char * const restrict Sequence,
+                int * const WORK, const size_t BSEQ, const size_t LSEQ, const int CutOff, const _Bool LOPT);
+int xali1_sse4a(const struct Profile * const restrict prf, const unsigned char * const restrict Sequence,
+                int * const WORK, const size_t BSEQ, const size_t LSEQ, const int CutOff, const _Bool LOPT);
+int xalip_sse2(const struct Profile * const restrict prf, const unsigned char * const restrict Sequence,
+	       union lScores * const restrict iop, union Positions * const restrict iom,
+	       union Positions * const restrict ioi, const size_t bseq, const size_t lseq,
+	       struct Alignment * const restrict alignment,
+	       _Bool * const restrict Lock, const size_t N1, const size_t N2, const _Bool Lopt,
+	       const int kcut, const size_t nali);
+int xalip_sse41(const struct Profile * const restrict prf, const unsigned char * const restrict Sequence,
+		union lScores * const restrict iop, union Positions * const restrict iom,
+		union Positions * const restrict ioi, const size_t bseq, const size_t lseq,
+		struct Alignment * const restrict alignment,
+		_Bool * const restrict Lock, const size_t N1, const size_t N2, const _Bool Lopt,
+		const int kcut, const size_t nali);
+int xalit_sse2(const struct Profile * const restrict prf, const size_t N1, const size_t N2, const size_t bseq, const size_t lseq,
+	       const unsigned char * const restrict Sequence, char * const restrict CALI,
+	       union lScores * const restrict iop,
+	       struct Alignment * const restrict alignment, const _Bool * const restrict Lock);       
+int xalit_sse41(const struct Profile * const restrict prf, const size_t N1, const size_t N2, const size_t bseq, const size_t lseq,
+		const unsigned char * const restrict Sequence, char * const restrict CALI,
+		union lScores * const restrict iop,
+		struct Alignment * const restrict alignment, const _Bool * const restrict Lock);           
+
+unsigned int heuristic(const struct Profile * const restrict prf, const PFSequence * const restrict Sequence,
+		       const unsigned int CutOff);
+unsigned int TransposeHeuristic_sse2(const float * const restrict TransposeMatch, const size_t Alphabet_Length,
+				     const size_t Profile_Length, const PFSequence * const restrict Sequence);
+unsigned int TransposeHeuristic_sse41(const int * const restrict TransposeMatch, const size_t Alphabet_Length,
+				      const size_t Profile_Length, const PFSequence * const restrict Sequence);
+unsigned int TransposeHeuristicGivenMemory_sse2(const float * const restrict TransposeMatch, float * const Memory,
+						const size_t Alphabet_Length, const size_t Profile_Length,
+						const PFSequence * const restrict Sequence);
+unsigned int TransposeHeuristicGivenMemory_sse41(const int * const restrict TransposeMatch, int * const Memory,
+						 const size_t Alphabet_Length, const size_t Profile_Length,
+						 const PFSequence * const restrict Sequence);
+
+void InitAverage(const union Scores * Matrices, const size_t prfLength, const size_t AlphabetLength, SAverage * const Average);
+void FreeAverage(SAverage * const Average);
+float ComputeAverageFrequencies(const PFSequence * const Sequence, SAverage * const Average);
+
+int N2R_1(const float R, const size_t SeqLength, const float AverageValue);
+int N2R_2(const float R, const size_t SeqLength, const float AverageValue);
+int N2R_3(const float R, const size_t SeqLength, const float AverageValue);
+float R2N_1(const int N, const size_t SeqLength, const float AverageValue);
+float R2N_2(const int N, const size_t SeqLength, const float AverageValue);
+float R2N_3(const int N, const size_t SeqLength, const float AverageValue);
+
+/******************* Output declarations *******************/
+typedef void (*PrintFunctionPtr)(const struct Profile * const, const char * * const, const struct Alignment * const,
+				 char * const, const size_t, const float, const int);
+void PrintSimple(const struct Profile * const prf, const char * * const AlignedSequence,
+		 const struct Alignment * const alignment, char * const Header,
+		 const size_t SequenceLength, const float RAVE, const int N);
+
+void PrintDefault(const struct Profile * const prf, const char * * const AlignedSequence,
+		 const struct Alignment * const alignment, char * const Header,
+		 const size_t SequenceLength, const float RAVE, const int N);
+
+void PrintInterpro(const struct Profile * const prf, const char * * const AlignedSequence,
+		 const struct Alignment * const alignment, char * const Header,
+		 const size_t SequenceLength, const float RAVE, const int N);
+
+void PrintPfscan(const struct Profile * const prf, const char * * const AlignedSequence,
+		 const struct Alignment * const alignment, char * const Header,
+		 const size_t SequenceLength, const float RAVE, const int N);
+
+void PrintTSV(const struct Profile * const prf, const char * * const AlignedSequence,
+		 const struct Alignment * const alignment, char * const Header,
+		 const size_t SequenceLength, const float RAVE, const int N);
+#endif
+
diff --git a/src/C/include/sequence.h b/src/C/include/sequence.h
new file mode 100644
index 0000000..b901a8a
--- /dev/null
+++ b/src/C/include/sequence.h
@@ -0,0 +1,115 @@
+#ifndef _SEQUENCE_H
+#define _SEQUENCE_H
+
+#define _FILE_OFFSET_BITS 64
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+#include "profile.h"
+
+typedef struct s_Data {
+  off_t Offset;
+  size_t HeaderLength;
+  size_t SequenceLength;
+} s_Data;
+
+typedef struct FASTAStructure {
+  char FileName[256];
+  s_Data  *DataPtr;
+  off_t FileSize;
+  size_t SequenceCount;
+  size_t MaxSequenceSize; // this includes carriage returns
+} FASTAStructure;
+
+typedef struct Sequence {
+  union {
+    char * Header;
+    void * Memory;
+  } Data;
+  PFSequence ProfileData;
+} Sequence;
+
+
+static inline PFSequence * ReadSequenceIndex(Sequence * const Seq, const size_t index, FILE * const stream, const s_Data * const DataPtr)
+{
+  /* Position into file */
+  fseek(stream, (long) DataPtr[index].Offset, SEEK_SET);
+
+  /* Read into memory */
+  register const size_t Size = DataPtr[index].HeaderLength + DataPtr[index].SequenceLength + 1; // + 1 accounts for \n in between
+  if (fread(Seq->Data.Header, sizeof(char), Size, stream) != Size) return NULL;
+
+  /* Bound text */
+  Seq->Data.Header[DataPtr[index].HeaderLength] = '\0';
+  Seq->Data.Header[Size] = '\0';
+
+  /* Set Sequence data start */
+  Seq->ProfileData.ProfileIndex = (unsigned char*) &(Seq->Data.Header[DataPtr[index].HeaderLength+1]);
+
+  /* Set Sequence length */
+  Seq->ProfileData.Length = DataPtr[index].SequenceLength;
+
+  return &(Seq->ProfileData);
+}
+
+#ifdef __USE_MMAP__
+static inline PFSequence * MMAPReadSequenceIndex(Sequence * const Seq, const size_t index, const char * const restrict Array,
+						 const s_Data * const DataPtr, const off_t InitialArrayOffset
+#ifdef MMAP_DEBUG
+	, const size_t ThreadId, const size_t NodeId, const size_t length
+#endif						
+)
+{
+  /* Position into Array */
+  register const size_t ArrayOffset = (size_t) ( DataPtr[index].Offset - InitialArrayOffset);
+//   fseek(stream, (long) DataPtr[index].Offset, SEEK_SET);
+
+  /* Read into memory */
+  register const size_t Size = DataPtr[index].HeaderLength + DataPtr[index].SequenceLength + 1; // + 1 accounts for \n in between
+#ifdef MMAP_DEBUG
+  if ( Size + ArrayOffset > length) {
+    fprintf(stderr,"Thread %lu from Node %lu Seq: %lu will read beyond mmap %lu > %lu\n", ThreadId, NodeId, index, Size + ArrayOffset, length);
+  }
+#endif
+  memcpy(Seq->Data.Header, &Array[ArrayOffset], sizeof(char)*Size);
+  
+//   if (fread(Seq->Data.Header, sizeof(char), Size, stream) != Size) return NULL;
+
+  /* Bound text */
+  Seq->Data.Header[DataPtr[index].HeaderLength] = '\0';
+  Seq->Data.Header[Size] = '\0';
+
+  /* Set Sequence data start */
+  Seq->ProfileData.ProfileIndex = (unsigned char*) &(Seq->Data.Header[DataPtr[index].HeaderLength+1]);
+
+  /* Set Sequence length */
+  Seq->ProfileData.Length = DataPtr[index].SequenceLength;
+
+  return &(Seq->ProfileData);
+}
+#endif
+
+static inline void ReadSequenceNameIndex(char * const Name, const size_t index, FILE * const stream, const s_Data * const DataPtr)
+{
+  /* Position into file */
+  fseek(stream, (long int) DataPtr[index].Offset, SEEK_SET);
+
+  /* Read into memory */
+  if (fscanf(stream, ">%s",Name) != 1) {
+    fprintf(stderr, "Read error for sequence name %lu\n", index);
+  }
+}
+
+
+static inline void FreeFASTAStructure(FASTAStructure * Info)
+{
+    free(Info->DataPtr);
+}
+int AnalyzeFASTAStructure(char * const FileName, FASTAStructure * const Info);
+int ExportFASTAStructure(FILE* stream, const FASTAStructure * const Info);
+int ImportFASTAStructure(FILE* stream, FASTAStructure * const Info);
+
+#endif
\ No newline at end of file
diff --git a/src/C/include/stamp-h1 b/src/C/include/stamp-h1
new file mode 100644
index 0000000..76ac0be
--- /dev/null
+++ b/src/C/include/stamp-h1
@@ -0,0 +1 @@
+timestamp for src/C/include/config.h
diff --git a/src/C/include/system.h b/src/C/include/system.h
new file mode 100644
index 0000000..a7deeb3
--- /dev/null
+++ b/src/C/include/system.h
@@ -0,0 +1,950 @@
+/*******************************************************
+                        PFTOOLS
+ *******************************************************
+  Sep 26, 2011 system.h
+ *******************************************************
+ (C) 2011 Swiss Institute of Bioinformatics
+     Thierry Schuepbach (thierry.schuepbach at isb-sib.ch)
+ *******************************************************/
+#ifndef SYSTEM_H_
+#define SYSTEM_H_
+#define _GNU_SOURCE
+#include <features.h> 
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdbool.h>
+#include <string.h>
+#include <sys/utsname.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <pwd.h>
+#include <sched.h>
+#ifdef __NUMA__
+#  include <numa.h>
+#endif
+
+
+#define MM_MMX    	0x00000001 /* standard MMX */
+#define MM_MMXEXT 	0x00000002 /* SSE integer functions or AMD MMX ext */
+#define MM_3DNOW  	0x00000004 /* AMD 3DNOW */
+#define MM_SSE    	0x00000008 /* SSE functions */
+#define MM_SSE2   	0x00000010 /* PIV SSE2 functions */
+#define MM_3DNOWEXT  	0x00000020 /* AMD 3DNowExt */
+#define MM_SSE3   	0x00000040 /* Prescott SSE3 functions */
+#define MM_SSSE3  	0x00000080 /* Conroe SSSE3 functions */
+#define MM_SSE41  	0x00000100 /* Penryn SSE41 functions */
+#define MM_SSE42  	0x00000200 /* Nehalem SSE42 functions */
+#define MM_POPCOUNT 	0x00000400
+#define MM_SSE4A	0x00000800 /* AMD Barcelona functions */
+#define MM_AVX          0x00001000 /* AVX technology 256 bits */
+
+#ifdef _SYSTEM_TEST
+#define __SYSTEM_DEBUG__
+#endif
+
+/* TOPOLOGY structure is as follow
+ * 
+ * 2  bits for hyperthreading threads b0, b1 : b1 is hyperthreading only, b0 is non hyperthreading
+ * 16 bits for the cores 
+ * 14 bits for the sockets  
+ * ------------------------
+ * 32 bits
+ */
+
+
+typedef struct SystemInfo {
+    /* Operating system data */
+    char Username[64];
+    char Release[64];
+    char Architecture[64];
+    char Nodename[64];
+    /* Architecture data */
+    char CPU_Vendor[13];
+    char CPU_Name[48];
+    unsigned int Family;
+    unsigned int Model;
+    unsigned int Extensions;
+    /* Topology */
+    unsigned int nSockets;
+    unsigned int nCores;
+    unsigned int nOverallCores;
+    _Bool HyperthreadingAvailable;
+    _Bool HyperthreadingOn;
+    unsigned int nComputeUnit;
+    unsigned int nCorePerComputeUnit;
+
+    unsigned int SocketSelectMask;
+    unsigned int CoreSelectMask;
+    unsigned int HyperthreadingMask;
+    unsigned int SocketSelectMaskShift;
+    unsigned int HyperthreadingMaskWidth;
+    
+    unsigned int * TopologyMasks;
+    unsigned int * APICID;
+#ifdef __NUMA__
+    unsigned int nNodes;
+    unsigned int nCpusPerNode;
+    _Bool NumaAble;
+#endif
+} __attribute__((aligned(16))) SystemInfo;
+
+
+extern __inline unsigned long __attribute__((__gnu_inline__, __always_inline__)) createMask(unsigned int numEntries, unsigned int *maskWidth)
+{
+    unsigned int i;
+    unsigned long k = ((unsigned long) numEntries) * 2L - 1L;
+    unsigned long index;
+    const unsigned int one = 1;
+    unsigned int AllZero;
+#if defined(__x86_64__) || defined(__amd64__)    
+    __asm__ __volatile__ (
+      "xorl   %0, %0; "
+      "bsrq  %2,%1; "
+      "cmovzl %3,%0;"
+      : "=r"(AllZero), "=r"(index)
+      : "r"(k), "m"(one)
+    );
+#else
+#error Code still needs to be ported to 32 bit machine
+#endif
+    if (AllZero) {
+      *maskWidth = 0; 
+      return 0L;
+    }
+    *maskWidth = (unsigned int) index;
+    if (index == 63L) {
+      return -1L;
+    } else {
+      return (1L << index) - 1L;
+    }
+}
+
+
+extern __inline void __attribute__((__gnu_inline__, __always_inline__)) freeSystemInfo(SystemInfo * const info)
+{
+  if (info->APICID) {
+    free(info->APICID);
+  }
+}
+
+extern __inline unsigned int __attribute__((__gnu_inline__, __always_inline__)) 
+getMasks(SystemInfo * const info, const unsigned int SocketId, const unsigned int CoreId, const unsigned int ThreadId, cpu_set_t * * const Masks)
+{
+  unsigned int count = 0;
+  unsigned int ValidMask;
+  
+  if (SocketId == 0 || CoreId == 0 || ThreadId == 0) return 0;
+  ValidMask  = ThreadId & 0x3;  
+  ValidMask |= (CoreId & 0xFFFF) << 2;
+  ValidMask |= (SocketId & 0x3FFF) << 18;
+#ifdef __SYSTEM_DEBUG__
+  fputs("Valid Mask  : ", stdout);
+  for (unsigned int j=0; j<32; ++j) {
+    if (ValidMask & (1 << (31 - j)) ) 
+      fputs("1",stdout);
+    else 
+      fputs("0", stdout);
+    if (j == 13 || j == 29) fputs(" ",stdout);
+  }
+  fputs("\n",stdout);
+#endif  
+  for (unsigned int thread=0; thread<info->nOverallCores; ++thread) {
+    register const unsigned int tmp = info->TopologyMasks[thread] & ValidMask;
+    if ((tmp & 0x3) && (tmp & 0x3FFFC) && (tmp & 0xFFFC0000)) ++count;
+  }
+  
+  if (count == 0) return 0;
+  
+  *Masks = (cpu_set_t*) malloc(count*sizeof(cpu_set_t));
+  if (*Masks == NULL) return 0;
+  count = 0;
+  for (unsigned int thread=0; thread<info->nOverallCores; ++thread) {
+    register const unsigned int tmp = info->TopologyMasks[thread] & ValidMask;
+    if ((tmp & 0x3) && (tmp & 0x3FFFC) && (tmp & 0xFFFC0000)) {
+       CPU_ZERO(*Masks + count);
+       CPU_SET(thread, *Masks + count);
+#ifdef __SYSTEM_DEBUG__
+       printf("Thread %2u   : ", thread);
+       for (unsigned int j=0; j<32; ++j) {
+	if (info->TopologyMasks[thread] & (1 << (31 - j)) ) 
+	  fputs("1",stdout);
+	else 
+	  fputs("0", stdout);
+	if (j == 13 || j == 29) fputs(" ",stdout);
+      }
+      fputs("\n",stdout);
+#endif
+      ++count;
+    }
+  } 
+  return count;
+}
+extern __inline void __attribute__((__gnu_inline__, __always_inline__)) getSystemInfo(SystemInfo * const info)
+{
+  struct utsname uts_name;
+  char username[16] __attribute__((aligned(16)));
+  time_t creation_time;
+
+  /* clear all data */
+  memset(info, 0, sizeof(SystemInfo));
+  
+  /*
+   *  OPERATING SYSTEM INFORMATIONS ------------------------------------------------
+   */
+  uname(&uts_name);
+  size_t tmp_size = strlen(uts_name.release);
+  if (tmp_size<63) {
+      strncpy(info->Release, uts_name.release, 64);
+  } else {
+      memcpy(info->Release, uts_name.release, 60);
+      info->Release[60] = '.';
+      info->Release[61] = '.';
+      info->Release[62] = '.';
+      info->Nodename[63] = '\0';
+  }
+#ifndef NO_USERNAME
+  uid_t uid = getuid();
+  struct passwd *pass= getpwuid(uid);
+  if ( pass != NULL) {
+      if (strlen(pass->pw_gecos) > 0) {
+	strncpy(info->Username,pass->pw_gecos,64);
+      } else {
+	strncpy(info->Username,pass->pw_name,64);
+      }
+  }
+#else
+  const char text[] = "Static linking prevent username query";
+  strcpy(info->Username, text);
+#endif
+  
+  tmp_size = strlen(uts_name.nodename);
+  if (tmp_size<63) {
+      strncpy(info->Nodename, uts_name.nodename, 64);
+  } else {
+      memcpy(info->Nodename, uts_name.nodename, 60);
+      info->Nodename[60] = '.';
+      info->Nodename[61] = '.';
+      info->Nodename[62] = '.';
+      info->Nodename[63] = '\0';
+  }  
+    
+  tmp_size = strlen(uts_name.machine);
+  if (tmp_size<63) {
+      strncpy(info->Architecture, uts_name.machine, 64);
+  } else {
+      memcpy(info->Architecture, uts_name.machine, 60);
+      info->Architecture[60] = '.';
+      info->Architecture[61] = '.';
+      info->Architecture[62] = '.';
+      info->Nodename[63] = '\0';
+  }
+  for (size_t i=0; i<13; ++i) info->CPU_Vendor[i] = '\0';
+  
+  /* Available number of logical processor seen by OS */
+  info->nOverallCores = (unsigned int) sysconf(_SC_NPROCESSORS_CONF);
+  
+  /*
+   * ARCHITECTURE INFORMATION -----------------------------------------------
+   */
+   
+  const char NOBrand[] = "Not supported by this cpu"; 
+  strcpy(info->CPU_Name, NOBrand);
+  
+  long a,c;
+  __asm__ __volatile__ (
+    /* See if CPUID instruction is supported ... */
+    /* ... Get copies of EFLAGS into eax and ecx */
+    "pushf\n\t"
+    "pop %0\n\t"
+    "mov %0, %1\n\t"
+
+    /* ... Toggle the ID bit in one copy and store */
+    /*     to the EFLAGS reg */
+    "xor $0x200000, %0\n\t"
+    "push %0\n\t"
+    "popf\n\t"
+
+    /* ... Get the (hopefully modified) EFLAGS */
+    "pushf\n\t"
+    "pop %0\n\t"
+    : "=a" (a), "=c" (c)
+    :
+    : "cc"
+    );
+  
+  unsigned int rval = 0;
+  if (a != c) {
+    int eax_value, ebx_value, ecx_value, edx_value;
+    
+    /* Get the CPU vendor string */
+    __asm__ __volatile__ (
+            "xorl %%eax, %%eax;"
+	    "xorl %%ecx, %%ecx;"
+	    "cpuid ;"
+	    "movl  %%ebx,   (%2);"
+	    "movl  %%edx,  4(%2);"
+	    "movl  %%ecx,  8(%2);"
+	    //"mov  %%ebx, 4(%0) ;" 
+	    : "=a"(eax_value)
+	    : "0" (eax_value), "r"(info->CPU_Vendor)
+	    : "memory", /*"%ebp",*/ "%ebx", "%ecx", "%edx");
+    
+    /* if available query SSE and MMX functionalities */
+    if (eax_value >= 1) {
+      eax_value = 1;
+      __asm__ __volatile__ (
+	      "cpuid ;"
+	      : "=a"(eax_value), "=b"(ebx_value), "=c"(ecx_value), "=d"(edx_value)
+	      : "0"(eax_value)
+	      );
+      
+      if (edx_value & (1<<23))    rval |= MM_MMX;
+      if (edx_value & (1<<25))    rval |= MM_MMXEXT | MM_SSE;
+      if (edx_value & (1<<26))    rval |= MM_SSE2;
+      if (ecx_value & 1)	  rval |= MM_SSE3;
+      if (ecx_value & (1<<9) )    rval |= MM_SSSE3;
+      if (ecx_value & (1<<19))    rval |= MM_SSE41;
+      if (ecx_value & (1<<20))    rval |= MM_SSE42;
+      if (ecx_value & (1<<23))    rval |= MM_POPCOUNT;
+      if (ecx_value & (1<<28))    rval |= MM_AVX;
+      
+      info->Family = (( eax_value >> 8 ) & 0xF) + (( eax_value >> 20 ) & 0xFF);
+      info->Model = (( eax_value >> 4 ) & 0xF) || ((( eax_value >> 16 ) & 0xF) << 4);
+    }
+  
+     __asm__ __volatile__ (
+	      "xorl %%ecx, %%ecx; "
+	      "cpuid ;"
+	      : "=a"(eax_value), "=b"(ebx_value), "=c"(ecx_value), "=d"(edx_value)
+	      : "0"(0x80000000)
+	      );
+    const unsigned int MaxLeaf = eax_value;
+#ifdef __SYSTEM_DEBUG__
+    fprintf(stderr, "Maximum extended leaf : 0x%8xh\n", MaxLeaf);
+#endif
+    if (MaxLeaf >= 0x80000001) {
+      __asm__ __volatile__ (
+	      "cpuid ;"
+	      : "=a"(eax_value), "=b"(ebx_value), "=c"(ecx_value), "=d"(edx_value)
+	      : "0"(0x80000001)
+	      );
+      
+      if (edx_value & (1<<31))  rval |= MM_3DNOW;
+      if (edx_value & (1<<30))  rval |= MM_3DNOWEXT;
+      if (edx_value & (1<<23))  rval |= MM_MMX;
+      if (edx_value & (1<<22))  rval |= MM_MMXEXT;
+      if (ecx_value & (1<<6))   rval |= MM_SSE4A;
+    } 
+    
+    if (MaxLeaf >= 0x80000004) {
+      /* Get the CPU brand string */
+      __asm__ __volatile__ (
+	    "xorl  %%ecx, %%ecx;"
+	    "movl  $0x80000002, %%eax;"
+	    "cpuid ;"
+	    "movl  %%eax,   (%0);"
+	    "movl  %%ebx,  4(%0);"
+	    "movl  %%ecx,  8(%0);"
+	    "movl  %%edx, 12(%0);"
+	    "movl  $0x80000003, %%eax;"
+	    "cpuid ;"
+	    "movl  %%eax, 16(%0);"
+	    "movl  %%ebx, 20(%0);"
+	    "movl  %%ecx, 24(%0);"
+	    "movl  %%edx, 28(%0);"
+	    "movl  $0x80000004, %%eax;"
+	    "cpuid ;"
+	    "movl  %%eax, 32(%0);"
+	    "movl  %%ebx, 36(%0);"
+	    "movl  %%ecx, 40(%0);"
+	    "movl  %%edx, 44(%0);"
+	    : 
+	    : "r"(info->CPU_Name)
+	    : "memory", "%eax", "%ebx", "%ecx", "%edx");
+      {
+	/* Correct space at the beginning */
+	char * ptr = info->CPU_Name;
+	size_t i = 0;
+	while (ptr[i] == ' ' && i < 48 ) ++i;
+	while (i < 48 ) { *ptr++ = info->CPU_Name[i++]; } 
+      }
+    } 
+    
+    info->Extensions = rval;
+    
+    /*
+     * TOPOLOGY INFORMATIONS ---------------------------------------------------------
+     */
+    
+    /* Intel Topology*/
+    if (info->CPU_Vendor[0] == 'G' && info->CPU_Vendor[1] == 'e') 
+    {
+      /* Do we support Leaf 11 (0xB) */
+      _Bool UseLeafB = false;
+      __asm__ __volatile__ (
+	      "xorl %%eax, %%eax;"
+	      "xorl %%ecx, %%ecx;"
+	      "cpuid ;"
+	      : "=a"(eax_value), "=b"(ebx_value), "=c"(ecx_value), "=d"(edx_value)
+	      );
+      const unsigned int MaxCPUID = eax_value;
+      if (eax_value >= 0xB) {
+	eax_value = 0xB;
+	__asm__ __volatile__ (
+	      "xorl %%ecx, %%ecx;"
+	      "cpuid ;"
+	      : "=a"(eax_value), "=b"(ebx_value), "=c"(ecx_value), "=d"(edx_value)
+	      : "0"(eax_value), "2"(ecx_value)
+	      );
+	UseLeafB = (ebx_value != 0); 
+      } 
+      /* Use HWMT hyperthreading feature flag to treat different configurations */
+      eax_value = 1;
+      __asm__ __volatile__ (
+	      "xorl %%ecx, %%ecx;"
+	      "cpuid ;"
+	      : "=a"(eax_value), "=b"(ebx_value), "=c"(ecx_value), "=d"(edx_value)
+	      : "0"(eax_value)
+	      );
+      
+      if (edx_value & (1<<28)) {
+	int wasCoreReported = 0;
+	int wasThreadReported = 0;
+	unsigned int ThreadPerCore = 1;
+	unsigned int MaxCore = 1;
+	
+	if (UseLeafB) {
+	  int subLeaf = 0, levelType, levelShift;
+	  unsigned int coreplusSMT_Mask;
+	  do {
+	    eax_value = 0xB;
+	    ecx_value = subLeaf;
+	    __asm__ __volatile__ (
+	      "cpuid ;"
+	      : "=a"(eax_value), "=b"(ebx_value), "=c"(ecx_value), "=d"(edx_value)
+	      : "0"(eax_value), "2"(ecx_value)
+	      );
+	    if (ebx_value == 0) break;
+	    
+	    levelType  = (ecx_value >> 8) & 0xFF;
+	    levelShift = (eax_value & 0xF);
+	    switch (levelType)
+	    {
+	      case 1:
+		//level type is SMT, so levelShift is the SMT_Mask_Width
+		info->HyperthreadingMask = ~((-1) << levelShift);
+		info->HyperthreadingMaskWidth = levelShift;
+		wasThreadReported = 1;
+		break;
+	      case 2: //level type is Core, so levelShift is the CorePlsuSMT_Mask_Width
+		coreplusSMT_Mask = ~((-1) << levelShift);
+		info->SocketSelectMaskShift = levelShift;
+		info->SocketSelectMask = (-1) ^ coreplusSMT_Mask;
+		wasCoreReported = 1;
+		break;
+	      default:
+		// handle in the future
+		break;
+	    }
+	    ++subLeaf;
+	  } while (1);
+	  
+	  if (wasThreadReported && wasCoreReported)
+	  {
+	    info->CoreSelectMask = coreplusSMT_Mask ^ info->HyperthreadingMask;
+	  }
+	  else if (!wasCoreReported && wasThreadReported)
+	  {
+	    info->CoreSelectMask = 0;
+	    info->SocketSelectMaskShift = info->HyperthreadingMaskWidth;
+	    info->SocketSelectMask = (-1) ^ info->HyperthreadingMask;
+	  }
+	  else //(case where !wasThreadReported)
+	  {
+	    // throw an error, this should not happen if hardware function normally
+	    fputs("Error in hardware info extraction\n", stderr);
+	    exit(1);
+	  }
+	  info->HyperthreadingAvailable = true;
+	  info->HyperthreadingOn = (wasThreadReported > 0); 
+	  
+	} else {
+	  const unsigned int MaxCorePlusThread = (ebx_value >> 16) & 0xFF;
+	  if (MaxCPUID >= 4) {
+	    eax_value = 4;
+	    __asm__ __volatile__ (
+	      "xorl %%ecx, %%ecx;"
+	      "cpuid ;"
+	      : "=a"(eax_value), "=b"(ebx_value), "=c"(ecx_value), "=d"(edx_value)
+	      : "0"(eax_value)
+	      );
+	    MaxCore = 1 + ( ( eax_value >> 26 ) & 0x3F );
+	    ThreadPerCore = MaxCorePlusThread / MaxCore;
+	    info->HyperthreadingAvailable = true;
+	    info->HyperthreadingOn = (MaxCorePlusThread > MaxCore ) ? true : false;
+	    
+	  } else {
+	    MaxCore = 1;
+	    ThreadPerCore = MaxCorePlusThread;
+	    
+	    /* Check whether BIOS is preventing Hyperthreading */
+	    eax_value = 0x80000000;
+	    __asm__ __volatile__ (
+	      "xorl %%ecx, %%ecx;"
+	      "cpuid ;"
+	      : "=a"(eax_value), "=b"(ebx_value), "=c"(ecx_value), "=d"(edx_value)
+	      : "0"(eax_value)
+	      );
+	    if ( MaxCPUID <= 4 && eax_value > 0x80000004) {
+	      info->HyperthreadingAvailable = true;
+	    } 
+	  }
+	  
+	  /* Create the masks */
+	  info->HyperthreadingMask = createMask(ThreadPerCore, &(info->HyperthreadingMaskWidth));
+	  info->CoreSelectMask = createMask(MaxCore, &(info->SocketSelectMaskShift));
+	  info->SocketSelectMaskShift += info->HyperthreadingMaskWidth;
+	  info->CoreSelectMask <<= info->HyperthreadingMaskWidth;
+	  info->SocketSelectMask = (-1) ^ (info->CoreSelectMask | info->HyperthreadingMask);  
+	}
+      } else {
+	/* Prior to Hyperthreading Technology only one thread per core */
+	info->SocketSelectMask = -1;
+      }
+      
+      /* Retrieve APIC data for each thread */
+      cpu_set_t Mask;
+      cpu_set_t BackupMask;
+      if ( sched_getaffinity(0, sizeof(cpu_set_t), &BackupMask)) {
+	  fputs("Error getting affinity!\n",stderr);
+	  exit(1);
+      }
+      
+      info->APICID = (unsigned int*) malloc(info->nOverallCores*(sizeof(unsigned int) + sizeof(unsigned int)));
+      info->TopologyMasks = &(info->APICID[info->nOverallCores]);
+      
+      if (UseLeafB) {
+	for (unsigned int thread =0; thread<info->nOverallCores; ++thread) {
+	  CPU_ZERO(&Mask);
+	  CPU_SET(thread, &Mask);
+	  if ( sched_setaffinity(0, sizeof(cpu_set_t), &Mask)) {
+	      fputs("Error setting affinity!\n",stderr);
+	      exit(1);
+	  }
+	  __asm__ __volatile__ (
+	      "xorl %%ecx, %%ecx;"
+	      "cpuid;"
+	      : "=d"(edx_value)
+	      : "a"(0xB)
+	      : "memory", "ebx", "ecx"
+	    );
+	  info->APICID[thread] = edx_value;
+	}
+      } else {
+	for (unsigned int thread =0; thread<info->nOverallCores; ++thread) {
+	  CPU_ZERO(&Mask);
+	  CPU_SET(thread, &Mask);
+	  if ( sched_setaffinity(0, sizeof(cpu_set_t), &Mask)) {
+	      fputs("Error setting affinity!\n",stderr);
+	      exit(1);
+	  }
+	  __asm__ __volatile__ (
+	      "xorl %%ecx, %%ecx;"
+	      "cpuid;"
+	      : "=b"(ebx_value)
+	      : "a"(0x1)
+	      : "memory", "%ecx", "%edx"
+	    );
+	  unsigned int tmp = ( ebx_value >> 24 ) & 0xFF;
+	  info->APICID[thread] = tmp;
+	}
+      }
+ 
+      if ( sched_setaffinity(0, sizeof(cpu_set_t), &BackupMask)) {
+	  fputs("Error setting affinity!\n",stderr);
+	  exit(1);
+      }
+#ifdef __SYSTEM_DEBUG__          
+      printf("HTT Mask (%2u)    : ",info->HyperthreadingMaskWidth);
+      for (unsigned int j=0; j<32; ++j) {
+	if ( info->HyperthreadingMask & (1 << (31 - j)) ) 
+	  fputs("1",stdout);
+	else 
+	  fputs("0", stdout);
+      }
+      fputs("\nCore Mask        : ",stdout);
+      for (unsigned int j=0; j<32; ++j) {
+	if ( info->CoreSelectMask & (1 << (31 - j)) ) 
+	  fputs("1",stdout);
+	else 
+	  fputs("0", stdout);
+      }
+      printf("\nSocket Mask (%2u) : ", info->SocketSelectMaskShift);
+      for (unsigned int j=0; j<32; ++j) {
+	if ( info->SocketSelectMask & (1 << (31 - j)) ) 
+	  fputs("1",stdout);
+	else 
+	  fputs("0", stdout);
+      }
+      fputs("\n",stdout);
+#endif
+      register unsigned int nSockets = 0;
+      register unsigned int nCores = 0;
+      for (unsigned int thread =0; thread<info->nOverallCores; ++thread) {
+	 register unsigned int TMask = 1 << (info->APICID[thread] & info->HyperthreadingMask);
+	 register unsigned int tmp = (info->APICID[thread] & info->CoreSelectMask) >> info->HyperthreadingMaskWidth;
+	 if (tmp > nCores) nCores = tmp;
+	 TMask |= 1 << (2 + tmp);
+	 tmp = (info->APICID[thread] & info->SocketSelectMask) >> info->SocketSelectMaskShift;
+	 if (tmp > nSockets) nSockets = tmp;
+	 TMask |= 1 << ( 18 + tmp);
+	 info->TopologyMasks[thread] = TMask;
+      }
+      info->nCores = 1 + nCores;
+      info->nSockets = 1 + nSockets;
+      
+//       const size_t SocketLDA = (size_t) (info->nCores);
+//       const size_t ThreadLDA = SocketLDA * info->nSockets;
+//       for (unsigned int thread =0; thread<info->nOverallCores; ++thread) {
+// 	const size_t CoreID   = (info->APICID[thread] & info->CoreSelectMask) >> info->HyperthreadingMaskWidth;
+// 	const size_t SocketID = (info->APICID[thread] & info->SocketSelectMask) >> info->SocketSelectMaskShift;
+// 	const size_t ThreadID = (info->APICID[thread] & info->HyperthreadingMask);
+// 	cpu_set_t * const currentMask = info->ThreadMasks + ThreadID*ThreadLDA + SocketID*SocketLDA + CoreID; 
+// 	CPU_ZERO(currentMask);
+// 	CPU_SET(thread, currentMask);
+//       }
+    } 
+    /* AMD Topology*/
+    else if (info->CPU_Vendor[0] == 'A' && info->CPU_Vendor[1] == 'u')
+    {
+      /* Use HTT hyperthreading feature flag to test single or multicore architecture */
+      eax_value = 1;
+      __asm__ __volatile__ (
+	      "xorl %%ecx, %%ecx;"
+	      "cpuid ;"
+	      : "=a"(eax_value), "=b"(ebx_value), "=c"(ecx_value), "=d"(edx_value)
+	      : "0"(eax_value)
+	      );
+      
+      if (edx_value & (1<<28)) {
+	/* Get the number of logical core per processor */
+	info->nCores = 1 + ((ebx_value >> 16) & 0xF);
+      } 
+      
+      /*Get the largest extension leaf supported */
+      eax_value = 0x80000000;
+      __asm__ __volatile__ (
+	    "xorl %%ecx, %%ecx;"
+	    "cpuid ;"
+	    : "=a"(eax_value)
+	    : "0"(eax_value)
+	    : "%ebx", "%ecx", "%edx"
+      );
+      
+      /* Bulldozer */
+      const _Bool IsBulldozer = eax_value >= 0x8000001E ? true : false;
+                  
+      /* Get the number of physical core per processor */
+      eax_value = 0x80000008;
+      __asm__ __volatile__ (
+	    "xorl %%ecx, %%ecx;"
+	    "cpuid ;"
+	    : "=a"(eax_value), "=b"(ebx_value), "=c"(ecx_value), "=d"(edx_value)
+	    : "0"(eax_value)
+      );
+      
+      info->nCores = 1 + (ecx_value & 0xF );
+      unsigned int coreplusSMT_MaskWidth = (ecx_value >> 12) & 0xF;
+      
+      /* Retrieve APIC data for each thread */
+      cpu_set_t Mask;
+      cpu_set_t BackupMask;
+      if ( sched_getaffinity(0, sizeof(cpu_set_t), &BackupMask)) {
+	  fputs("Error getting affinity!\n",stderr);
+	  exit(1);
+      }
+      
+      info->APICID = (unsigned int*) malloc(info->nOverallCores*(sizeof(unsigned int) + sizeof(unsigned int)));
+      info->TopologyMasks = &(info->APICID[info->nOverallCores]);
+      
+      if (!IsBulldozer) {
+	for (unsigned int thread =0; thread<info->nOverallCores; ++thread) {
+	  CPU_ZERO(&Mask);
+	  CPU_SET(thread, &Mask);
+	  if ( sched_setaffinity(0, sizeof(cpu_set_t), &Mask)) {
+	      fputs("Error setting affinity!\n",stderr);
+	      exit(1);
+	  }
+	  __asm__ __volatile__ (
+	      "xorl %%ecx, %%ecx;"
+	      "cpuid;"
+	      : "=b"(ebx_value)
+	      : "a"(0x1)
+	      : "%ecx", "%edx"
+	    );
+	  unsigned int tmp = ( ebx_value >> 24 ) & 0xFF;
+	  info->APICID[thread] = tmp;
+	}
+      } else {
+	/* Get number of core per compute unit assuming all are identical */
+	__asm__ __volatile__ (
+	      "xorl %%ecx, %%ecx;"
+	      "cpuid;"
+	      : "=b"(ebx_value)
+	      : "a"(0x8000001E)
+	      : "%ecx", "%edx"
+	    );
+	info->nCorePerComputeUnit = 1 + ( ( ebx_value >> 8) & 0xFF );
+	unsigned int nCU = 0;
+	for (unsigned int thread =0; thread<info->nOverallCores; ++thread) {
+	  CPU_ZERO(&Mask);
+	  CPU_SET(thread, &Mask);
+	  if ( sched_setaffinity(0, sizeof(cpu_set_t), &Mask)) {
+	      fputs("Error setting affinity!\n",stderr);
+	      exit(1);
+	  }
+	 
+	  __asm__ __volatile__ (
+	      "xorl %%ecx, %%ecx;"
+	      "cpuid;"
+	      : "=b"(ebx_value)
+	      : "a"(0x1)
+	      : "%ecx", "%edx"
+	    );
+	  unsigned int tmp = ( ebx_value >> 24 ) & 0xFF;
+	  info->APICID[thread] = tmp;
+#ifdef __SYSTEM_DEBUG__	  
+	  fprintf(stderr,"APIC DATA (%2u)   : ", thread);
+	  for (unsigned int j=0; j<8; ++j) {
+	    if ( tmp & (1 << (7 - j)) ) 
+	      fputs("1",stderr);
+	    else 
+	      fputs("0", stderr);
+	  }
+#endif
+	  __asm__ __volatile__ (
+	      "xorl %%ecx, %%ecx;"
+	      "cpuid;"
+	      : "=b"(ebx_value)
+	      : "a"(0x8000001E)
+	      : "%ecx", "%edx"
+	    );
+	  
+	  tmp = ebx_value & 0xFF;
+	  if (tmp > nCU) nCU = tmp;
+#ifdef __SYSTEM_DEBUG__		  
+	  fputs(" CU ",stderr);
+	  for (unsigned int j=0; j<8; ++j) {
+	    if ( tmp & (1 << (7 - j)) ) 
+	      fputs("1",stderr);
+	    else 
+	      fputs("0", stderr);
+	  }
+	  fputs("\n", stderr);
+#endif
+	}
+	info->nComputeUnit = 1 + nCU;
+      }
+      
+      
+      /* Create the masks */
+      if ( info->nCorePerComputeUnit ) {
+	info->HyperthreadingMask = createMask(info->nCorePerComputeUnit, &(info->HyperthreadingMaskWidth));
+	coreplusSMT_MaskWidth -= info->HyperthreadingMaskWidth; 
+      } else {
+	info->HyperthreadingMask = 0;
+      }
+      info->SocketSelectMaskShift = coreplusSMT_MaskWidth;
+      info->CoreSelectMask = ( 1 << coreplusSMT_MaskWidth ) - 1; //createMask(coreplusSMT_MaskWidth, &(info->SocketSelectMaskShift));
+      info->SocketSelectMaskShift += info->HyperthreadingMaskWidth;
+      info->CoreSelectMask <<= info->HyperthreadingMaskWidth;
+      info->SocketSelectMask = (-1) ^ (info->CoreSelectMask | info->HyperthreadingMask);  
+       
+      if ( sched_setaffinity(0, sizeof(cpu_set_t), &BackupMask)) {
+	  fputs("Error setting affinity!\n",stderr);
+	  exit(1);
+      }
+#ifdef __SYSTEM_DEBUG__     
+      printf("HTT Mask (%2u)    : ",info->HyperthreadingMaskWidth);
+      for (unsigned int j=0; j<32; ++j) {
+	if ( info->HyperthreadingMask & (1 << (31 - j)) ) 
+	  fputs("1",stdout);
+	else 
+	  fputs("0", stdout);
+      }
+      fputs("\nCore Mask        : ",stdout);
+      for (unsigned int j=0; j<32; ++j) {
+	if ( info->CoreSelectMask & (1 << (31 - j)) ) 
+	  fputs("1",stdout);
+	else 
+	  fputs("0", stdout);
+      }
+      printf("\nSocket Mask (%2u) : ", info->SocketSelectMaskShift);
+      for (unsigned int j=0; j<32; ++j) {
+	if ( info->SocketSelectMask & (1 << (31 - j)) ) 
+	  fputs("1",stdout);
+	else 
+	  fputs("0", stdout);
+      }
+      fputs("\n",stdout);
+#endif
+      register unsigned int nSockets = 0;
+      register unsigned int nCores = 0;
+      for (unsigned int thread =0; thread<info->nOverallCores; ++thread) {
+	register unsigned int TMask = 1 << (info->APICID[thread] & info->HyperthreadingMask);
+	register unsigned int tmp = (info->APICID[thread] & info->CoreSelectMask) >> info->HyperthreadingMaskWidth;
+	if (tmp > nCores) nCores = tmp;
+	TMask |= 1 << (2 + tmp);
+	
+	tmp = (info->APICID[thread] & info->SocketSelectMask) >> info->SocketSelectMaskShift;
+	if (tmp > nSockets) nSockets = tmp;
+	TMask |= 1 << ( 18 + tmp);
+	info->TopologyMasks[thread] = TMask;
+#ifdef __SYSTEM_DEBUG__
+	fprintf(stderr,"APIC DATA (%2u)   : ", thread);
+	for (unsigned int j=0; j<32; ++j) {
+	  if ( info->APICID[thread] & (1 << (31 - j)) ) 
+	    fputs("1",stderr);
+	  else 
+	    fputs("0", stderr);
+	}
+	fputs("\n",stderr);
+#endif
+      }
+      //info->nCores = 1 + nCores;
+      info->nSockets = 1 + nSockets;
+    }
+  }
+
+#ifdef __NUMA__
+  info->NumaAble     = (numa_available() < 0) ? false : true;
+  if (info->NumaAble) {
+    info->nNodes       = (unsigned int) numa_num_configured_nodes();
+    info->nCpusPerNode = numa_num_configured_cpus() / info->nNodes;
+  }
+#endif
+}
+
+extern __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__))
+printSystemInfo(const SystemInfo * const info)
+{ 
+  char Buffer[80] __attribute__((aligned(16)));
+  char OtherBuffer[80] __attribute__((aligned(16)));
+  const char Template[80] __attribute__((aligned(16))) = "|                                                                            |\n";
+  char * ptr;
+  const size_t Length = strlen(Template);
+  const char * LastCharacter = &Buffer[Length - 2];
+  
+  fputs("|  System informations                                                       |\n"
+	"%----------------------------------------------------------------------------%\n", stderr);
+  
+#define WRITE(LeftSpace, Title, Value) {\
+  memcpy(Buffer, Template, Length*sizeof(char));\
+  char * lptr = &Buffer[LeftSpace];\
+  lptr += sprintf(lptr, Title);\
+  const char * ValuePtr = Value;\
+  while (*ValuePtr != '\0' && lptr < LastCharacter) { *lptr++ = *ValuePtr++;}\
+  fputs(Buffer,stderr);\
+}
+  WRITE(5,"Host name      : ", info->Nodename);
+  WRITE(5,"User name      : ", info->Username);
+  WRITE(5,"Linux kernel   : ", info->Release);
+  WRITE(5,"Architecture   : ", info->Architecture);
+  WRITE(5,"CPU vendor     : ", info->CPU_Vendor);
+  WRITE(5,"CPU Brand      : ", info->CPU_Name);
+  sprintf(OtherBuffer, "0x%xh", info->Family);
+  WRITE(5,"Family         : ", OtherBuffer);
+  sprintf(OtherBuffer, "0x%xh", info->Model);
+  WRITE(5,"Model          : ", OtherBuffer);
+  
+  ptr = OtherBuffer;
+  if (info->Extensions & MM_MMXEXT)   ptr += sprintf(ptr," MMXExt");
+  if (info->Extensions & MM_SSE)      ptr += sprintf(ptr," SSE");
+  if (info->Extensions & MM_SSE2)     ptr += sprintf(ptr," SSE2");
+  if (info->Extensions & MM_SSE3)     ptr += sprintf(ptr," SSE3");
+  if (info->Extensions & MM_SSSE3)    ptr += sprintf(ptr," SSSE3");
+  if (info->Extensions & MM_SSE41)    ptr += sprintf(ptr," SSE4.1");
+  if (info->Extensions & MM_SSE42)    ptr += sprintf(ptr," SSE4.2");
+  if (info->Extensions & MM_3DNOW)    ptr += sprintf(ptr," 3DNow");
+  if (info->Extensions & MM_3DNOWEXT) ptr += sprintf(ptr," 3DNowExt");
+  if (info->Extensions & MM_SSE4A)    ptr += sprintf(ptr," SSE4a");
+  if (info->Extensions & MM_POPCOUNT) ptr += sprintf(ptr," POPCOUNT");
+  if (info->Extensions & MM_AVX)      ptr += sprintf(ptr," AVX");
+  if (ptr > &OtherBuffer[Length-2-21]) {
+    ptr = &OtherBuffer[Length-2-21];
+    while ( ptr > &OtherBuffer[0] && *ptr != ' ') --ptr;
+    *ptr = '\0';
+    WRITE(5, "CPU extensions :", OtherBuffer );
+    WRITE(5, "               : ", ++ptr);
+  } else {
+    WRITE(5, "CPU extensions :", OtherBuffer);
+  }
+  if (info->HyperthreadingAvailable) {
+    if ( info->HyperthreadingOn) {
+      WRITE(5, "Hyperthreading : ", "Available");
+    } else {
+      WRITE(5,"Hyperthreading : ", "Available but BIOS disabled");
+    }
+  }
+  sprintf(OtherBuffer,"%u", info->nSockets);
+  WRITE(5, "Socket         : ", OtherBuffer);
+  if (info->nComputeUnit) {
+    sprintf(OtherBuffer,"%u", info->nComputeUnit);
+    WRITE(5, "Compute unit   : ", OtherBuffer);
+    sprintf(OtherBuffer,"%u", info->nCorePerComputeUnit);
+    WRITE(5, "Core per unit  : ",OtherBuffer);
+  }
+  sprintf(OtherBuffer, "%u", info->nCores);
+  WRITE(5, "Cores          : ", OtherBuffer);
+  sprintf(OtherBuffer, "%u", info->nOverallCores);
+  WRITE(5, "Overall cores  : ", OtherBuffer);
+#ifdef __NUMA__
+  if (info->NumaAble) {
+    WRITE(5,"NUMA           : ", "Available");
+    sprintf(OtherBuffer, "%u", info-<nNodes);
+    WRITE(5,"NUMA nodes     : ", OtherBuffer);
+  } else {
+    WRITE(5,"NUMA           : ", "Not available");
+  }
+#endif
+ 
+  fputs("%----------------------------------------------------------------------------%\n", stderr);
+}
+
+#ifdef _SYSTEM_TEST
+int main (int argc, char * argv[]) 
+{
+  SystemInfo Info;
+  cpu_set_t * Masks;
+  
+  getSystemInfo(&Info);
+  printSystemInfo(&Info);
+  
+  if (argc == 4) {
+    unsigned int SocketId = (unsigned int) atoi(argv[1]);
+    unsigned int CoreId = (unsigned int) atoi(argv[2]);
+    unsigned int ThreadId = (unsigned int) atoi(argv[3]);
+    fprintf(stderr,"Input %u %u %u\n", SocketId, CoreId, ThreadId);
+    
+    const unsigned int count = getMasks(&Info, SocketId, CoreId, ThreadId, &Masks); 
+    printf("%u masks satisfy the criteria\n", count);
+    
+    for (unsigned int i=0; i<count; ++i) {
+      for (unsigned int j=0; j<32; ++j) {
+	if ( CPU_ISSET(31-j,&Masks[i]) ) 
+	  fputs("1",stdout);
+	else 
+	  fputs("0", stdout);
+      }
+      fputs("\n",stdout);
+      
+    }
+    
+  }
+  freeSystemInfo(&Info);
+  
+  return 1; 
+}
+
+#endif
+#endif
\ No newline at end of file
diff --git a/src/C/pfdunp b/src/C/pfdunp
new file mode 100755
index 0000000..5989b4d
Binary files /dev/null and b/src/C/pfdunp differ
diff --git a/src/C/prg/numa_threads.h b/src/C/prg/numa_threads.h
new file mode 100644
index 0000000..0427692
--- /dev/null
+++ b/src/C/prg/numa_threads.h
@@ -0,0 +1,850 @@
+/*******************************************************
+                        PFTOOLS
+ *******************************************************
+  Oct 3, 2011 numa_threads.h
+ *******************************************************
+ (C) 2011 Swiss Institute of Bioinformatics
+     Thierry Schuepbach (thierry.schuepbach at isb-sib.ch)
+ *******************************************************/
+#ifndef NUMA_THREADS_H_
+#define NUMA_THREADS_H_
+#define _FILE_OFFSET_BITS 64
+#include <numa.h>
+
+#ifdef __USE_MMAP__
+#include <numaif.h>
+#include <sys/mman.h>
+#endif
+
+// #define volatile 
+
+#ifdef NUMA_DEBUG
+void numa_run_mask(char* mask)
+{
+ struct bitmask * bit = numa_get_run_node_mask();
+ for (unsigned long i=0; i<bit->size; ++i) {
+    if (numa_bitmask_isbitset(bit, i)) {
+     mask[i] = '1' ; 
+    } else {
+      mask[i] = '0' ;
+    }
+ }
+ mask[bit->size] = '\0';
+}
+
+#endif
+
+struct numa_NodeData {
+  const struct Profile * prf;
+  const FASTAStructure * FASTA;
+  char * SequenceFileName;
+//   char * Sequences;
+  __32bitData * Array;
+  FILE ** TempOutputFile;
+  volatile size_t *shares;
+  volatile size_t shareStart;
+//   volatile size_t maxShare;
+  size_t NodeId;
+//   size_t nNodes;
+  volatile size_t nthreads;
+};
+
+struct numa_ThreadData {
+  const struct Profile * prf;
+  const FASTAStructure * FASTA;
+#ifdef __USE_MMAP__
+  volatile char * SequenceFileMap;
+  volatile off_t InitialArrayOffset;
+#ifdef MMAP_DEBUG
+  volatile size_t * maplength;
+#endif
+#else
+  char * SequenceFileName;
+#endif
+  char * Sequences;
+  __32bitData * Array;
+  TransposeMatrix TransposeMatch;
+  int * FilterWork;
+  union lScores * iop;
+  union Positions * iom;
+  union Positions * ioi;
+  struct Alignment * alignment;
+  _Bool * lock;
+  FILE ** TempOutputFile;
+  volatile int ** FilterScores; 
+  size_t NodeFirstSeq;
+  volatile size_t start;
+  volatile size_t stop;
+  unsigned int counter;
+  size_t threadId;
+#ifdef NUMA_DEBUG
+  size_t NodeId;
+#endif
+  pthread_mutex_t *ThreadMutex;
+  pthread_cond_t  *ThreadCond;
+  volatile int * thread_counter;
+  pthread_mutex_t *NodeMutex;
+  pthread_cond_t  *NodeCond;
+  volatile _Bool *NodeDone;
+};
+
+
+/* Mutex for Node to trigger Master */
+pthread_mutex_t NodeMutex;
+pthread_cond_t  NodeCond;
+volatile int NodeCounter;
+
+/* Mutex for Master to trigger Nodes */
+pthread_mutex_t MasterMutex;
+pthread_cond_t  MasterCond;
+volatile _Bool MasterDone;
+
+#endif
+
+
+static void * SIMD(numa_thread)(void * _Data) 
+{ 
+/*#ifdef NUMA_DEBUG
+  char mask[1024];
+  numa_run_mask(mask);
+  fprintf(stderr,"Thread %lu from node %lu started with cpu mask %s\n",
+	  ((struct numa_ThreadData*) _Data)->threadId,
+	  ((struct numa_ThreadData*) _Data)->NodeId,
+	  mask);
+#endif*/
+  ////////////////////////////////////////////////////////////////////////////////////////
+  // 1. Parse _Data according to numa_threadData
+  const struct Profile * const restrict prf   = ((struct numa_ThreadData*) _Data)->prf;
+  const FASTAStructure * const restrict FASTA = ((struct numa_ThreadData*) _Data)->FASTA;
+  Sequence SeqData                            = { {Memory: ((struct numa_ThreadData*) _Data)->Sequences }, { NULL, 0}} ;
+  pthread_mutex_t * ThreadMutex               = ((struct numa_ThreadData*) _Data)->ThreadMutex;
+  pthread_cond_t * ThreadCond                 = ((struct numa_ThreadData*) _Data)->ThreadCond;
+  pthread_mutex_t * NodeMutex                 = ((struct numa_ThreadData*) _Data)->NodeMutex;
+  pthread_cond_t * NodeCond                   = ((struct numa_ThreadData*) _Data)->NodeCond;
+  
+  ////////////////////////////////////////////////////////////////////////////////////////
+  // 2. Open database file
+  // TODO: Add error check here
+#ifndef __USE_MMAP__
+  FILE * const inSequence = fopen(((struct numa_ThreadData*) _Data)->SequenceFileName, "r");
+#else
+  const char * const restrict SequenceFileMap = ((struct numa_ThreadData*) _Data)->SequenceFileMap;
+  const size_t InitialArrayOffset             = ((struct numa_ThreadData*) _Data)->InitialArrayOffset;
+#endif
+  ////////////////////////////////////////////////////////////////////////////////////////
+  // 3. Heuristic phase
+  {
+#if SIMD_VER  == 2
+    const float * const restrict TransposeMatch = ((struct numa_ThreadData*) _Data)->TransposeMatch.f;
+    float * const restrict Scores               = &( ((struct numa_ThreadData*) _Data)->Array[0].FloatScores );
+#elif SIMD_VER == 41
+    const int * const restrict TransposeMatch   = ((struct numa_ThreadData*) _Data)->TransposeMatch.i;
+    unsigned int * const restrict Scores        = &( ((struct numa_ThreadData*) _Data)->Array[0].UnsignedScores );
+#endif
+#ifndef STACK
+ #if SIMD_VER  == 2
+    float * const Work                          = (float*) ((struct numa_ThreadData*) _Data)->FilterWork;
+ #elif SIMD_VER == 41
+    int * const Work                            = (int*) ((struct numa_ThreadData*) _Data)->FilterWork;   
+ #endif
+#endif
+    const register size_t NodeFirstSeq          = ((struct numa_ThreadData*) _Data)->NodeFirstSeq;
+    const register size_t Start                 = ((struct numa_ThreadData*) _Data)->start;
+    const register size_t Stop                  = ((struct numa_ThreadData*) _Data)->stop;
+#ifdef NUMA_DEBUG
+    fprintf(stderr, "\t\tThread %lu of Node %lu heuristic sequences from %lu to %lu\n",
+	    ((struct numa_ThreadData*) _Data)->threadId,
+	    ((struct numa_ThreadData*) _Data)->NodeId,
+	    NodeFirstSeq+Start, NodeFirstSeq+Stop);
+#endif       
+    /* LOOPS ON SEQUENCES */
+    for (size_t i=Start; i<Stop; ++i) {
+#ifdef __USE_MMAP__
+      PFSequence * PFSeq = MMAPReadSequenceIndex(&SeqData, NodeFirstSeq+i, SequenceFileMap, FASTA->DataPtr, InitialArrayOffset
+#ifdef MMAP_DEBUG
+	, ((struct numa_ThreadData*) _Data)->threadId, ((struct numa_ThreadData*) _Data)->NodeId, *(((struct numa_ThreadData*) _Data)->maplength)
+#endif
+      );
+//       fprintf(stderr, "Seq %lu\n%s\n",NodeFirstSeq+i, PFSeq->ProfileIndex);
+#else
+      PFSequence * PFSeq = ReadSequenceIndex(&SeqData, NodeFirstSeq+i, inSequence, FASTA->DataPtr);
+#endif
+      /* Translate first sequence */
+      PFSeq = TranslateSequenceToIndex(PFSeq, prf->Alphabet_Mapping);
+#ifdef STACK
+      Scores[i] = SIMD(TransposeHeuristic)(TransposeMatch, prf->Alphabet_Length, prf->Length, PFSeq);
+#else
+      Scores[i] = SIMD(TransposeHeuristicGivenMemory)(TransposeMatch, Work,
+						     prf->Alphabet_Length, prf->Length, PFSeq);                            
+#endif
+    }
+
+    /* Notify node of finished stage */
+    pthread_mutex_lock(ThreadMutex);
+#ifdef NUMA_DEBUG
+    fprintf(stderr, "\t\tThread %lu of Node %lu heuristic finished: counter at %i\n",
+	    ((struct numa_ThreadData*) _Data)->threadId,
+	    ((struct numa_ThreadData*) _Data)->NodeId,
+	    *(((struct numa_ThreadData*) _Data)->thread_counter));
+#endif    
+    *(((struct numa_ThreadData*) _Data)->thread_counter) -= 1;
+    if (*(((struct numa_ThreadData*) _Data)->thread_counter) == 0) {
+      pthread_cond_signal(ThreadCond);
+#ifdef NUMA_DEBUG
+      fprintf(stderr, "\t\tThread %lu of Node %lu notify Node.\n", ((struct numa_ThreadData*) _Data)->threadId,
+	    ((struct numa_ThreadData*) _Data)->NodeId);
+#endif
+    }
+    pthread_mutex_unlock(ThreadMutex);
+  }
+  
+  ////////////////////////////////////////////////////////////////////////////////////////
+  // 3. Filter phase
+  /* Wait for signal from master node */
+  pthread_mutex_lock(NodeMutex);
+  if (! *(((struct numa_ThreadData*) _Data)->NodeDone)) {
+#ifdef NUMA_DEBUG
+      fprintf(stderr, "\t\tThread %lu of Node %lu waiting on Node.\n", ((struct numa_ThreadData*) _Data)->threadId,
+	    ((struct numa_ThreadData*) _Data)->NodeId);
+#endif  
+    pthread_cond_wait(NodeCond, NodeMutex);
+  }
+#ifdef NUMA_DEBUG 
+  else {
+    fprintf(stderr, "\t\tThread %lu of Node %lu DID NOT WAIT !!!\n",
+	    ((struct numa_ThreadData*) _Data)->threadId,
+	    ((struct numa_ThreadData*) _Data)->NodeId);
+  }
+#endif
+  pthread_mutex_unlock(NodeMutex);
+  
+  {
+    const unsigned int * const restrict SeqID   = &( ((struct numa_ThreadData*) _Data)->Array->ToDoID );
+    int * const restrict Scores                 = *( ((struct numa_ThreadData*) _Data)->FilterScores );
+    int * restrict Work                         = ((struct numa_ThreadData*) _Data)->FilterWork;
+    const register size_t Start                 = ((struct numa_ThreadData*) _Data)->start;
+    const register size_t Stop                  = ((struct numa_ThreadData*) _Data)->stop;
+#ifdef __USE_MMAP__
+    const char * const restrict SequenceFileMap2= ((struct numa_ThreadData*) _Data)->SequenceFileMap;
+    const size_t InitialArrayOffset2            = ((struct numa_ThreadData*) _Data)->InitialArrayOffset;
+#endif
+#ifdef NUMA_DEBUG
+      fprintf(stderr, "\t\tThread %lu of Node %lu filtering %lu to %lu.\n",
+	      ((struct numa_ThreadData*) _Data)->threadId, ((struct numa_ThreadData*) _Data)->NodeId,
+	      Start, Stop );
+#endif    
+    /* LOOPS ON SEQUENCES */
+    for (size_t i=Start; i<Stop; ++i) {
+#ifdef __USE_MMAP__
+      PFSequence * PFSeq = MMAPReadSequenceIndex(&SeqData, (size_t) SeqID[i], SequenceFileMap2, FASTA->DataPtr, InitialArrayOffset2
+#ifdef MMAP_DEBUG
+	, ((struct numa_ThreadData*) _Data)->threadId, ((struct numa_ThreadData*) _Data)->NodeId, *(((struct numa_ThreadData*) _Data)->maplength)
+#endif
+      );
+#else
+      PFSequence * PFSeq = ReadSequenceIndex(&SeqData, (size_t) SeqID[i], inSequence, FASTA->DataPtr);
+#endif
+
+      /* Translate first sequence */
+      PFSeq = TranslateSequenceToIndex(PFSeq, prf->Alphabet_Mapping);
+      
+      Scores[i] = xali1_ptr(prf, PFSeq->ProfileIndex, Work, 0,
+			    PFSeq->Length, prf->CutOffData.ICUT[0], false);     
+    }
+  }
+  
+  /* Notify node of finished stage */
+  pthread_mutex_lock(ThreadMutex);
+#ifdef NUMA_DEBUG
+  fprintf(stderr, "\t\tThread %lu of Node %lu filter finished: counter at %i\n",
+	  ((struct numa_ThreadData*) _Data)->threadId,
+	  ((struct numa_ThreadData*) _Data)->NodeId,
+	  *(((struct numa_ThreadData*) _Data)->thread_counter));
+#endif    
+  *(((struct numa_ThreadData*) _Data)->thread_counter) -= 1;
+  if (*(((struct numa_ThreadData*) _Data)->thread_counter) == 0) {
+    pthread_cond_signal(ThreadCond);
+#ifdef NUMA_DEBUG
+    fprintf(stderr, "\t\tThread %lu of Node %lu notify Node.\n", ((struct numa_ThreadData*) _Data)->threadId,
+	  ((struct numa_ThreadData*) _Data)->NodeId);
+#endif
+  }
+  pthread_mutex_unlock(ThreadMutex);
+
+  ////////////////////////////////////////////////////////////////////////////////////////
+  // 4. Alignment phase
+  /* Wait for signal from master node */
+
+  pthread_mutex_lock(NodeMutex);
+  if (! *((struct numa_ThreadData*) _Data)->NodeDone) {
+    pthread_cond_wait(NodeCond, NodeMutex);
+#ifdef NUMA_DEBUG
+    fprintf(stderr, "\t\tThread %lu of Node %lu waiting for node.\n",
+	    ((struct numa_ThreadData*) _Data)->threadId,
+	    ((struct numa_ThreadData*) _Data)->NodeId);
+#endif  
+  } 
+#ifdef NUMA_DEBUG 
+  else {
+    fprintf(stderr, "\t\tThread %lu of Node %lu DID NOT WAIT !!!\n",
+	    ((struct numa_ThreadData*) _Data)->threadId,
+	    ((struct numa_ThreadData*) _Data)->NodeId);
+  }
+#endif
+  pthread_mutex_unlock(NodeMutex);
+  
+  {
+    const unsigned int * const restrict SeqID   = &( ((struct numa_ThreadData*) _Data)->Array->ToDoID );
+    union lScores * const restrict iop          = ((struct numa_ThreadData*) _Data)->iop;
+    union Positions * const restrict iom        = ((struct numa_ThreadData*) _Data)->iom;
+    union Positions * const restrict ioi        = ((struct numa_ThreadData*) _Data)->ioi;
+    struct Alignment * const restrict alignment = ((struct numa_ThreadData*) _Data)->alignment;
+    _Bool * const restrict Lock                 = ((struct numa_ThreadData*) _Data)->lock;
+    const register size_t Start                 = ((struct numa_ThreadData*) _Data)->start;
+    const register size_t Stop                  = ((struct numa_ThreadData*) _Data)->stop;
+    // WARNING: reusing some moemory to old sequences result
+    char * const Sequences                      = (char*) &(((struct numa_ThreadData*) _Data)->TransposeMatch);
+
+#ifdef NUMA_DEBUG
+      fprintf(stderr, "\t\tThread %lu of Node %lu aligning %lu to %lu.\n",
+	      ((struct numa_ThreadData*) _Data)->threadId, ((struct numa_ThreadData*) _Data)->NodeId,
+	      Start, Stop );
+#endif        
+
+    /* LOOPS ON SEQUENCES */
+    for (size_t i=Start; i<Stop; ++i) {
+#ifdef __USE_MMAP__
+      PFSequence * PFSeq = MMAPReadSequenceIndex(&SeqData, SeqID[i], SequenceFileMap, FASTA->DataPtr, InitialArrayOffset
+#ifdef MMAP_DEBUG
+	, ((struct numa_ThreadData*) _Data)->threadId, ((struct numa_ThreadData*) _Data)->NodeId, *(((struct numa_ThreadData*) _Data)->maplength)
+#endif	
+	
+      );
+#else
+      PFSequence * PFSeq = ReadSequenceIndex(&SeqData, SeqID[i], inSequence, FASTA->DataPtr);
+#endif
+    
+      /* Translate first sequence */
+      PFSeq = TranslateSequenceToIndex(PFSeq, prf->Alphabet_Mapping);
+
+      /* Clear Lock */
+      memset(Lock, 0, FASTA->MaxSequenceSize*sizeof(_Bool));
+      
+      // It seems we must have sequence starting from 1 here
+      const int nali = xalip_ptr(prf, PFSeq->ProfileIndex, iop, iom, ioi, 1, PFSeq->Length, alignment,
+			    Lock, prf->DisjointData.NDIP[0], prf->DisjointData.NDIP[1], false, 
+			    prf->CutOffData.ICUT[0], NALI); 
+			    
+      if (nali <= 0) {
+	fputs("Internal error xalip reported no possible alignment!\n",stderr);
+	exit(1);          
+      }
+      int IPM[2];
+      // Alignement is not filled from start !!!
+      for ( int j=1; j<=nali; j++) {  
+	/* Remove lock for aligned sequence generation */
+	memset(Lock, 0, FASTA->MaxSequenceSize*sizeof(_Bool));
+	memset(Sequences, 0, 15*(1+prf->Length)*sizeof(char));
+	
+	if (xalit_ptr(prf, prf->DisjointData.NDIP[0], prf->DisjointData.NDIP[1], 1, PFSeq->Length, &(PFSeq->ProfileIndex[0]),
+		  Sequences, iop, &alignment[j], Lock, IPM) < 0 ) {
+	  fputs("Internal error within xalit!\n", stderr);
+	  exit(1);
+	}
+	char * cptr = SeqData.Data.Header;
+	while ( *cptr != ' ') ++cptr;
+	*cptr = '\0';
+	fprintf(stdout, "%s  %i %i\n%s\n", SeqData.Data.Header, alignment[j].JALS, j, Sequences);           
+      }
+    }
+  }
+  
+  ////////////////////////////////////////////////////////////////////////////////////////
+  // 5. Close
+#ifndef __USE_MMAP__
+  fclose(inSequence);
+#endif
+  pthread_exit(0);
+}
+
+static void * SIMD(numa_node)(void * _Data) 
+{
+#ifdef NUMA_DEBUG
+  fprintf(stderr,"\tNode %lu started with %lu child threads.\n",
+	  ((struct numa_NodeData*) _Data)->NodeId,
+	  ((struct numa_NodeData*) _Data)->nthreads);
+#endif
+  size_t i;
+  volatile _Bool IamDone = false;
+  int * FilterScores;
+  pthread_mutex_t WaitForThreadMutex, WakeUpThreadMutex;
+  pthread_cond_t  WaitForThreadCond, WakeUpThreadCond;
+  
+  ////////////////////////////////////////////////////////////////////////////////////////
+  // 0. Bound thread to node
+  struct bitmask *Mask = numa_allocate_cpumask();
+  Mask = numa_bitmask_clearall(Mask);
+  Mask = numa_bitmask_setbit(Mask, (int) ( ((struct numa_NodeData*) _Data)->NodeId));
+  numa_bind(Mask);
+#ifndef __USE_MMAP__
+  numa_set_membind(Mask);
+  numa_free_cpumask(Mask);
+#else
+  ////////////////////////////////////////////////////////////////////////////////////////
+  // 0.1 Map sequence file to bound memory
+  const FASTAStructure * const restrict FASTA = ((struct numa_NodeData*) _Data)->FASTA; 
+  int thread_counter = (int) ((struct numa_NodeData*) _Data)->nthreads;
+  const int fd = open(((struct numa_NodeData*) _Data)->SequenceFileName,
+		       O_RDONLY );
+  
+  const size_t PageSize = sysconf(_SC_PAGE_SIZE);
+  size_t StartIndex = ((struct numa_NodeData*) _Data)->shares[((struct numa_NodeData*) _Data)->shareStart];
+  off_t Offset = FASTA->DataPtr[StartIndex].Offset;
+  
+  off_t InitialArrayOffset = Offset & ~(PageSize -1);
+  size_t StopIndex = ((struct numa_NodeData*) _Data)->shares[((struct numa_NodeData*) _Data)->shareStart + thread_counter];
+  size_t length = (size_t) (FASTA->DataPtr[StopIndex].Offset - InitialArrayOffset);
+#ifdef NUMA_DEBUG
+  fprintf(stderr, "\tNode %lu map file index: %lu-%lu offset: %lu to %lu that is %lu with length %lu\n",
+	  ((struct numa_NodeData*) _Data)->NodeId,
+	  StartIndex, StopIndex,
+	  Offset, FASTA->DataPtr[StopIndex].Offset,
+	  InitialArrayOffset, length);
+#endif
+  char * SequenceFileMap = (char *) mmap(NULL, length, PROT_READ, MAP_PRIVATE, fd, InitialArrayOffset);
+  if (SequenceFileMap == NULL) {
+    fputs("Unable to map sequence file to memory\n", stderr);
+    exit(1);
+  }
+  if (mbind(SequenceFileMap, length, MPOL_BIND, Mask->maskp, Mask->size, MPOL_MF_STRICT) != 0) {
+      munmap(SequenceFileMap,length);
+      perror("mbind");
+      exit(1);
+  }
+#endif
+  
+  
+  ////////////////////////////////////////////////////////////////////////////////////////
+  // 1. Initialize thread sync tools
+  pthread_mutex_init(&WaitForThreadMutex, NULL);
+  pthread_cond_init(&WaitForThreadCond, NULL);
+  pthread_mutex_init(&WakeUpThreadMutex, NULL);
+  pthread_cond_init(&WakeUpThreadCond, NULL);
+  
+  ////////////////////////////////////////////////////////////////////////////////////////
+  // 2. Parse _Data according to numa_NodeData
+  const struct Profile * const restrict prf   = ((struct numa_NodeData*) _Data)->prf;
+#ifndef __USE_MMAP__
+  const FASTAStructure * const restrict FASTA = ((struct numa_NodeData*) _Data)->FASTA;
+  int thread_counter = (int) ((struct numa_NodeData*) _Data)->nthreads;
+#endif
+  
+  ////////////////////////////////////////////////////////////////////////////////////////
+  // 3. Allocates memory bound to node for all childs
+  //    1        x ID / Score        | Maxshare given by master
+  //    1        x TransposeMatrix   | (Profile_Length+1 + 63) & ~63 * Alphabet_Length
+  //    nThreads x Sequences         | FASTA->MaxSequenceSize
+  //    nThreads x Filter work array | (1+prf->Length)*4+63 & ~63 
+  //    nthreads x Alignment needs
+  //		union lScores * const restrict iop   = _mm_malloc((1+prf->Length)*sizeof(union lScores), 16);
+  //		union Positions * const restrict iom = _mm_malloc((1+prf->Length)*sizeof(union Positions), 16);
+  //		union Positions * const restrict ioi = _mm_malloc((1+prf->Length)*sizeof(union Positions), 16);
+  //		struct Alignment * const restrict alignment = _mm_malloc(NALI*sizeof(struct Alignment),16);
+  //		_Bool * const restrict Lock = _mm_malloc(FASTA->MaxSequenceSize*sizeof(_Bool), 16);
+  
+  // WARNING: it is assumed that numa allocates on page size boundaries, hence aligned for SSE
+  const size_t nthreads                        = ((struct numa_NodeData*) _Data)->nthreads;
+  const size_t Profile_Length                  = 1+prf->Length;
+  const size_t TransposeMatrixLeadingDimension = (Profile_Length*sizeof(float)+63) & ~63;
+  const size_t MaxSequenceSize                 = (FASTA->MaxSequenceSize*sizeof(char) + 63) & ~63;
+  const size_t FilterWork                      = (4*Profile_Length*sizeof(float) + 63) & ~63;
+  const size_t ScoreSize                       = (Profile_Length*sizeof(union lScores) + 16) & ~16;
+  const size_t PositionSize                    = (Profile_Length*sizeof(union Positions) + 16) & ~16;
+  const size_t AlignmentSize                   = (NALI*sizeof(struct Alignment)+16) & ~16;
+  const size_t LockSize                        = (FASTA->MaxSequenceSize*sizeof(_Bool)+16) & ~16;
+  // TODO: Avoid false share dependencies by padding to cache line the sequence data
+  char * NodeMemory = numa_alloc_local( TransposeMatrixLeadingDimension*prf->Alphabet_Length
+				      + nthreads*( MaxSequenceSize
+					         + FilterWork
+						 + ScoreSize
+						 + 2*PositionSize
+						 + AlignmentSize
+						 + LockSize) );
+  if (NodeMemory == NULL) {
+      fprintf(stderr,"Node %lu cannot allocate sufficient local memory.\n",((struct numa_NodeData*) _Data)-> NodeId);
+      exit(1);
+  } 
+  
+  ////////////////////////////////////////////////////////////////////////////////////////
+  // 4. Transpose Match matrix locally
+#if SIMD_VER == 2
+  float * const restrict TransposeMatchMatrix = (float*) ( NodeMemory );
+  TransposeAndConvertToFloatMatchMatrixGivenMemory( TransposeMatchMatrix,
+						    &(prf->Scores.Match),
+						    prf->Alphabet_Length,
+						    prf->Length,
+						    TransposeMatrixLeadingDimension/sizeof(float)
+						  );
+#elif SIMD_VER == 41
+  int * const restrict TransposeMatchMatrix = (int *) ( NodeMemory );
+  TransposeAndConvertMatchMatrixGivenMemory( TransposeMatchMatrix,
+					    &(prf->Scores.Match),
+					    prf->Alphabet_Length,
+					    prf->Length,
+					    TransposeMatrixLeadingDimension/sizeof(float)
+					    );
+#endif
+  ////////////////////////////////////////////////////////////////////////////////////////
+  // 5. Run child thread for heuristic inheriting bound node
+  struct numa_ThreadData *threads_arg = alloca(nthreads*sizeof(struct numa_ThreadData));
+  pthread_t *threads = (pthread_t*) alloca(nthreads*sizeof(pthread_t));
+  size_t *shares = (size_t*) alloca((1+nthreads)*sizeof(pthread_t));
+  const size_t lShareStart = ((struct numa_NodeData*) _Data)->shareStart;
+  size_t NodeFirstSeq;
+  {
+    {
+      const size_t * const restrict SharePtr = &( ((struct numa_NodeData*) _Data)->shares[lShareStart] );
+      NodeFirstSeq = SharePtr[0];
+      i=0;
+      do {
+	shares[i] = SharePtr[i] - NodeFirstSeq; 
+      } while (++i <= nthreads);
+    }
+    i=0;
+    do {
+      threads_arg[i].prf                       = prf;
+      threads_arg[i].FASTA                     = FASTA;
+      threads_arg[i].Array                     = ((struct numa_NodeData*) _Data)->Array;
+#if SIMD_VER == 2
+      threads_arg[i].TransposeMatch.f          = TransposeMatchMatrix;
+#elif SIMD_VER == 41
+      threads_arg[i].TransposeMatch.i          = TransposeMatchMatrix;
+#endif
+      threads_arg[i].Sequences                 = (char*)(NodeMemory + TransposeMatrixLeadingDimension*prf->Alphabet_Length + i*MaxSequenceSize);
+      register char * tmp                      = (char*) (NodeMemory + TransposeMatrixLeadingDimension*prf->Alphabet_Length + nthreads*MaxSequenceSize);
+      threads_arg[i].FilterWork                = (int*) ( tmp + i*FilterWork);
+      register char * tmp2                     = tmp + nthreads*FilterWork;
+      threads_arg[i].iop                       = (union lScores *) (tmp2 + i*ScoreSize);
+      register char * tmp3                     = tmp2 + nthreads*ScoreSize;
+      threads_arg[i].iom                       = (union Positions *) (tmp3 + i*PositionSize);
+      register char * tmp4                     = tmp3 + nthreads*PositionSize;
+      threads_arg[i].ioi                       = (union Positions *) (tmp4 + i*PositionSize);
+      register char * tmp5                     = tmp4 + nthreads*PositionSize;
+      threads_arg[i].alignment                 = (struct Alignment *) (tmp5 + i*AlignmentSize);
+      register char * tmp6                     = tmp5 + nthreads*AlignmentSize;
+      threads_arg[i].lock                      = (_Bool*) (tmp6 + i*LockSize);
+#ifdef __USE_MMAP__
+      threads_arg[i].SequenceFileMap           = SequenceFileMap;
+      threads_arg[i].InitialArrayOffset        = InitialArrayOffset;
+#else
+      threads_arg[i].SequenceFileName          = ((struct numa_NodeData*) _Data)->SequenceFileName;
+#endif
+      threads_arg[i].FilterScores              = &FilterScores;
+      threads_arg[i].NodeFirstSeq              = NodeFirstSeq;
+      threads_arg[i].start                     = shares[i];
+      threads_arg[i].stop                      = shares[i+1];
+      threads_arg[i].threadId                  = i;
+      threads_arg[i].ThreadMutex               = &WaitForThreadMutex;
+      threads_arg[i].ThreadCond                = &WaitForThreadCond;
+      threads_arg[i].NodeMutex                 = &WakeUpThreadMutex;
+      threads_arg[i].NodeCond                  = &WakeUpThreadCond;
+      threads_arg[i].thread_counter            = &thread_counter;
+      threads_arg[i].NodeDone                  = &IamDone;
+#ifdef NUMA_DEBUG
+      threads_arg[i].NodeId                    = ((struct numa_NodeData*) _Data)->NodeId;
+#endif
+#ifdef MMAP_DEBUG
+      threads_arg[i].maplength                 = &length;
+#endif
+      if (pthread_create (&threads[i],  NULL, SIMD(numa_thread),  (void*) &threads_arg[i]) != 0) {
+	fprintf(stderr,"\tNode %lu failed to create thread %lu.\n", ((struct numa_NodeData*) _Data)->NodeId, i);
+	exit(1);
+      } 
+    } while (++i < nthreads);
+  }
+  size_t MyMaxShare = shares[nthreads];
+#if SIMD_VER == 2
+  const float HeuristicCutOff = prf->HeuristicCutOff;
+#elif SIMD_VER == 41
+  const unsigned int HeuristicCutOff = (unsigned int) prf->HeuristicCutOff;
+#endif
+  
+  pthread_mutex_lock(&WaitForThreadMutex);
+  if ( thread_counter > 0 ) {
+#ifdef NUMA_DEBUG
+  fprintf(stderr, "\tNode %lu waiting for child threads to finish heuristic.\n",
+	  ((struct numa_NodeData*) _Data)->NodeId);
+#endif
+    pthread_cond_wait(&WaitForThreadCond, &WaitForThreadMutex);
+  }
+  pthread_mutex_unlock(&WaitForThreadMutex);
+  
+  ////////////////////////////////////////////////////////////////////////////////////////
+  // 6. Gather and wait for master to trigger next phase
+  size_t HeuristicCounter = 0;
+  i=0;
+  __32bitData * restrict YesNoID = ((struct numa_NodeData*) _Data)->Array;
+  do {
+#if SIMD_VER == 2
+   if (YesNoID[i].FloatScores >= HeuristicCutOff) {
+#elif SIMD_VER == 41
+	if (YesNoID[i].UnsignedScores >= HeuristicCutOff) {
+#endif
+      YesNoID[HeuristicCounter].ToDoID = (unsigned int) (NodeFirstSeq + i);
+      ++HeuristicCounter;
+   }
+  } while (++i < MyMaxShare);
+  
+  ((struct numa_NodeData*) _Data)->shares[((struct numa_NodeData*) _Data)->NodeId] = HeuristicCounter;
+  fprintf(stderr, "\tNode %lu counted %lu/%lu heuristic passed sequences\n", 
+	  ((struct numa_NodeData*) _Data)->NodeId, HeuristicCounter, MyMaxShare);
+  
+  /* Notify Master if phase is finished */
+  pthread_mutex_lock(&NodeMutex);
+  if (--NodeCounter <= 0 ) {
+#ifdef NUMA_DEBUG    
+    fprintf(stderr, "\tNode %lu signal master for heuristic finished.\n",
+	  ((struct numa_NodeData*) _Data)->NodeId);
+#endif
+    pthread_cond_signal(&NodeCond);
+  }
+  pthread_mutex_unlock(&NodeMutex);
+        
+  ////////////////////////////////////////////////////////////////////////////////////////
+  // 7. Run child thread for filter inheriting bound node
+  // TODO: check that if there is not enough to work on it will be ok
+
+  /* Wait for master to start phase */
+  pthread_mutex_lock(&MasterMutex);
+  if (!MasterDone) {
+#ifdef NUMA_DEBUG
+    fprintf(stderr, "\tNode %lu waiting master to enter filter phase.\n",
+	  ((struct numa_NodeData*) _Data)->NodeId);
+#endif
+    pthread_cond_wait(&MasterCond, &MasterMutex);
+  }
+  pthread_mutex_unlock(&MasterMutex);
+  
+  ////////////////////////////////////////////////////////////////////////////////////////
+  // 7.1 Map sequence file to bound memory
+  unsigned int * const restrict SeqID = &(((struct numa_NodeData*) _Data)->Array[0].ToDoID);
+  StartIndex = ((struct numa_NodeData*) _Data)->shares[lShareStart];
+  StopIndex = ((struct numa_NodeData*) _Data)->shares[lShareStart + nthreads];
+  MyMaxShare = StopIndex - StartIndex;
+  size_t FilterScoresSize = MyMaxShare;
+  /* Allocate memory for the filter scores */
+  FilterScores = numa_alloc_local(MyMaxShare*sizeof(int));
+  if (FilterScores == NULL) {
+    fputs("Unable to allocate local node memory for filter scores\n", stderr);
+    exit(1);
+  }
+  
+  Offset = FASTA->DataPtr[SeqID[0]].Offset;
+  InitialArrayOffset = Offset & ~(PageSize -1);
+  length = (size_t) (FASTA->DataPtr[SeqID[MyMaxShare-1]+1].Offset - InitialArrayOffset);
+#ifdef NUMA_DEBUG
+  fprintf(stderr, "\tNode %lu share part of %lu SeqID: %lu(%u)-%lu(%u) file offset: %lu to %lu that is %lu with length %lu\n",
+	  ((struct numa_NodeData*) _Data)->NodeId, MyMaxShare,
+	  StartIndex, SeqID[0], StopIndex, SeqID[MyMaxShare-1],
+	  Offset, FASTA->DataPtr[SeqID[MyMaxShare-1]+1].Offset,
+	  InitialArrayOffset, length);
+#endif
+  SequenceFileMap = (char *) mmap(NULL, length, PROT_READ, MAP_PRIVATE, fd, InitialArrayOffset);
+  if (SequenceFileMap == NULL) {
+    fputs("Unable to map sequence file to memory\n", stderr);
+    exit(1);
+  }
+  if (mbind(SequenceFileMap, length, MPOL_BIND, Mask->maskp, Mask->size, MPOL_MF_STRICT) != 0) {
+      munmap(SequenceFileMap,length);
+#ifdef NUMA_DEBUG
+      fprintf(stderr, "\tNode %lu cannot bind memory\n", ((struct numa_NodeData*) _Data)->NodeId);
+#endif
+      perror("mbind");
+      exit(1);
+  }
+  
+  NodeFirstSeq = ((struct numa_NodeData*) _Data)->shares[lShareStart];
+  i=0;
+  do {
+    shares[i] = ((struct numa_NodeData*) _Data)->shares[lShareStart + i] - NodeFirstSeq; 
+  } while (++i <= nthreads);
+
+  i=0;
+  do {
+    threads_arg[i].start = shares[i];
+    threads_arg[i].stop  = shares[i+1];
+#ifdef __USE_MMAP__
+    threads_arg[i].SequenceFileMap    = SequenceFileMap;
+    threads_arg[i].InitialArrayOffset = InitialArrayOffset;
+#endif
+  } while (++i < nthreads);
+  
+  /* Wake up child threads */
+  pthread_mutex_lock(&WakeUpThreadMutex);
+  thread_counter = (int) nthreads;
+  IamDone = false;
+  pthread_cond_broadcast(&WakeUpThreadCond);
+  pthread_mutex_unlock(&WakeUpThreadMutex);
+
+  ////////////////////////////////////////////////////////////////////////////////////////
+  // 8. Gather / transfer new data and share
+  pthread_mutex_lock(&WaitForThreadMutex);
+  if ( thread_counter > 0 ) {
+#ifdef NUMA_DEBUG
+    fprintf(stderr, "\tNode %lu waiting for child threads to finish filter.\n",
+	  ((struct numa_NodeData*) _Data)->NodeId);
+#endif
+    pthread_cond_wait(&WaitForThreadCond, &WaitForThreadMutex);
+  }
+  pthread_mutex_unlock(&WaitForThreadMutex);
+
+  size_t FilterCounter = 0;
+  const int FilterCutOff = prf->CutOffData.ICUT[0];
+  i=0; 
+  do {
+    if (FilterScores[i] >= FilterCutOff) {
+      SeqID[FilterCounter] = SeqID[i];
+      ++FilterCounter;
+    }
+  } while (++i < MyMaxShare);
+  ((struct numa_NodeData*) _Data)->shares[((struct numa_NodeData*) _Data)->NodeId] = FilterCounter;
+  
+  fprintf(stderr, "\tNode %lu counted %lu/%lu filter passed sequences\n", 
+	  ((struct numa_NodeData*) _Data)->NodeId, FilterCounter, MyMaxShare);
+  
+  /* Notify Master if phase is finished */
+  pthread_mutex_lock(&NodeMutex);
+  if (--NodeCounter <= 0 ) { 
+#ifdef NUMA_DEBUG    
+    fprintf(stderr, "\tNode %lu signal master for filter finished.\n",
+	  ((struct numa_NodeData*) _Data)->NodeId);
+#endif
+    pthread_cond_signal(&NodeCond);
+  }
+  pthread_mutex_unlock(&NodeMutex);
+  
+#ifdef __USE_MMAP__
+  /* set back default memory policy and unmap file*/
+  { 
+    const int res = mbind(SequenceFileMap, length, MPOL_DEFAULT, 0, 0, MPOL_MF_STRICT);
+    munmap(SequenceFileMap,length);
+    if (res != 0) {
+      perror("mbind");
+      exit(1);
+    }
+  }
+#endif      
+  ////////////////////////////////////////////////////////////////////////////////////////
+  // 9. Run child thread for alignment inheriting bound node
+  
+  /* Wait for master to start phase */
+  pthread_mutex_lock(&MasterMutex);
+  if (!MasterDone) { 
+#ifdef NUMA_DEBUG
+    fprintf(stderr, "\tNode %lu waiting master to enter alignment phase.\n",
+	  ((struct numa_NodeData*) _Data)->NodeId);
+#endif 
+    pthread_cond_wait(&MasterCond, &MasterMutex);
+  }
+  pthread_mutex_unlock(&MasterMutex);
+  
+  ////////////////////////////////////////////////////////////////////////////////////////
+  // 9.1 Map sequence file to bound memory
+  StartIndex = ((struct numa_NodeData*) _Data)->shares[lShareStart];
+  StopIndex = ((struct numa_NodeData*) _Data)->shares[lShareStart + nthreads];
+  MyMaxShare = StopIndex - StartIndex;
+  
+  Offset = FASTA->DataPtr[SeqID[0]].Offset;
+  InitialArrayOffset = Offset & ~(PageSize -1);
+  length = (size_t) (FASTA->DataPtr[SeqID[MyMaxShare-1]+1].Offset - InitialArrayOffset);
+#ifdef NUMA_DEBUG
+  fprintf(stderr, "\tNode %lu share part of %lu SeqID: %lu(%u)-%lu(%u) file offset: %lu to %lu that is %lu with length %lu\n",
+	  ((struct numa_NodeData*) _Data)->NodeId, MyMaxShare,
+	  StartIndex, SeqID[0], StopIndex, SeqID[MyMaxShare-1],
+	  Offset, FASTA->DataPtr[SeqID[MyMaxShare-1]+1].Offset,
+	  InitialArrayOffset, length);
+#endif
+  SequenceFileMap = (char *) mmap(NULL, length, PROT_READ, MAP_PRIVATE, fd, InitialArrayOffset);
+  if (SequenceFileMap == NULL) {
+    fputs("Unable to map sequence file to memory\n", stderr);
+    exit(1);
+  }
+  if (mbind(SequenceFileMap, length, MPOL_BIND, Mask->maskp, Mask->size, MPOL_MF_STRICT) != 0) {
+      munmap(SequenceFileMap,length);
+#ifdef NUMA_DEBUG
+      fprintf(stderr, "\tNode %lu cannot bind memory\n", ((struct numa_NodeData*) _Data)->NodeId);
+#endif
+      perror("mbind");
+      exit(1);
+  }
+  
+  NodeFirstSeq = ((struct numa_NodeData*) _Data)->shares[lShareStart];
+  i=0;
+  do {
+    shares[i] = ((struct numa_NodeData*) _Data)->shares[lShareStart + i] - NodeFirstSeq; 
+  } while (++i <= nthreads);
+
+  i=0;
+  do {
+    threads_arg[i].start = shares[i];
+    threads_arg[i].stop  = shares[i+1];
+#ifdef __USE_MMAP__
+    threads_arg[i].SequenceFileMap    = SequenceFileMap;
+    threads_arg[i].InitialArrayOffset = InitialArrayOffset;
+#endif
+  } while (++i < nthreads);
+  
+  /* Wake up child threads */
+#ifdef NUMA_DEBUG
+  fprintf(stderr, "\tNode %lu triggers alignment.\n",
+	  ((struct numa_NodeData*) _Data)->NodeId);
+#endif
+  
+  pthread_mutex_lock(&WakeUpThreadMutex);
+  thread_counter = nthreads;
+  IamDone = true;
+  pthread_cond_broadcast(&WakeUpThreadCond);
+  pthread_mutex_unlock(&WakeUpThreadMutex);
+ 
+
+  ////////////////////////////////////////////////////////////////////////////////////////
+  // 10. Join child threads
+  i=0;
+  do {
+    pthread_join(threads[i], NULL);
+  } while (++i < nthreads);
+  
+#ifdef __USE_MMAP__
+  ////////////////////////////////////////////////////////////////////////////////////////
+  // 10.1 unmap file from memory
+  /* set back default memory policy and unmap file*/
+  { 
+    const int res = mbind(SequenceFileMap, length, MPOL_DEFAULT, 0, 0, MPOL_MF_STRICT);
+    munmap(SequenceFileMap,length);
+    if (res != 0) {
+      perror("mbind");
+      exit(1);
+    }
+  }
+#endif
+  
+  ////////////////////////////////////////////////////////////////////////////////////////
+  // 11. Free Memory and close
+#ifdef __USE_MMAP__
+  numa_free_cpumask(Mask);
+#endif
+  numa_free(FilterScores, FilterScoresSize);
+  numa_free(NodeMemory, TransposeMatrixLeadingDimension*prf->Alphabet_Length
+				      + nthreads*( MaxSequenceSize
+					         + FilterWork
+						 + ScoreSize
+						 + 2*PositionSize
+						 + AlignmentSize
+						 + LockSize));
+  pthread_mutex_destroy(&WakeUpThreadMutex);
+  pthread_cond_destroy(&WakeUpThreadCond);
+  pthread_mutex_destroy(&WaitForThreadMutex);
+  pthread_cond_destroy(&WaitForThreadCond);
+  pthread_exit(0);
+}
+
diff --git a/src/C/prg/pfsearch.c b/src/C/prg/pfsearch.c
new file mode 100644
index 0000000..f7fd2ed
--- /dev/null
+++ b/src/C/prg/pfsearch.c
@@ -0,0 +1,1566 @@
+/*******************************************************
+                        PFTOOLS
+ *******************************************************
+  Oct 3, 2011 pfsearch.c
+ *******************************************************
+ (C) 2011 Swiss Institute of Bioinformatics
+     Thierry Schuepbach (thierry.schuepbach at isb-sib.ch)
+ *******************************************************/
+#define _GNU_SOURCE
+#include <features.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <mm_malloc.h>
+#include <sys/time.h>
+#include <pthread.h>
+#include <alloca.h>
+#include <inttypes.h>
+#include <getopt.h>
+#ifdef __USE_AFFINITY__
+# include <unistd.h>
+# include <sched.h>
+#endif
+#ifdef __USE_MMAP__
+#include <sys/mman.h>
+#endif
+
+#define NALI 256
+#define HEADER "%----------------------------------------------------------------------------%\n"\
+	       "|                              PFSEARCH v3.0                                 |\n"\
+	       "%----------------------------------------------------------------------------%\n"\
+	       "| Built on " __DATE__ " at " __TIME__ ".                                          |\n"
+
+#include "profile.h"
+#include "sequence.h"
+#include "system.h"
+
+typedef union TransposeMatrix { const int * i; float * f;} TransposeMatrix;
+typedef union __32bitData { 
+   unsigned int ToDoID;
+   int          SignedScores;
+   unsigned int UnsignedScores;
+   float        FloatScores;
+} __32bitData;
+
+struct ThreadData {
+  const struct Profile * prf;
+  const FASTAStructure * FASTA;
+#ifdef __USE_MMAP__ 
+  const char * SequenceFileMap;
+#ifdef MMAP_DEBUG
+  size_t * maplength;
+#endif
+#else
+  char * SequenceFileName;
+#endif
+  char * Sequences;
+  __32bitData * Array;
+  int * FilterScores;
+  TransposeMatrix TransposeMatch;
+  FILE ** TempOutputFile;
+  size_t start;
+  size_t stop;
+  unsigned int counter; /* WARNING: in filter phase counter == 0 means stop when cutoff reached, 1 -> compute real filter value */ 
+  size_t threadId;
+};
+
+static SystemInfo System;
+#ifdef __NUMA__
+static int noNUMA = 0;
+#endif
+static int indexDatabase = 0;
+#ifdef __NUMA__
+static const char opt_to_test[] = "C:c:i:t:T:vhAandDN:S:sl:m:o:W:";
+#else
+# ifdef __USE_AFFINITY__
+static const char opt_to_test[] = "C:c:i:t:T:vhAasdDl:m:0:W:M:bkfo:";
+# else
+static const char opt_to_test[] = "C:c:i:t:T:vhAasdDl:m:0:W:o:";
+# endif
+#endif
+static const struct option long_options[] =
+{
+        /*
+	 * These options set a flag. 
+	 */
+
+	
+        /* 
+	 * These options don't set a flag. We distinguish them by their indices. 
+	 */
+	{"help",               		no_argument,       	0,	'h'},
+	{"sse2",			no_argument,		0,	's'},
+#ifdef __NUMA__
+	/* NUMA */
+        {"no-numa",			no_argument,		0,     	'n'},
+	{"nnodes",			required_argument,	0,	'N'},
+	{"max-heuristic-nnodes",	required_argument,	0,	'S'},
+#endif
+	/* Heuristic */
+	{"dump-heuristic-scores",	no_argument,		0,	'A'},
+	{"dump-filter-sequences",	no_argument,		0,	'd'},
+	/* Filter */
+	{"dump-alignment-sequences",	no_argument,		0,	'D'},
+	/* Database indexing options */ 
+	{"create-index-database",	required_argument,	0,	'c'},
+	{"use-index-database",		required_argument,	0,	'i'},
+	/* Others */
+	{"cutoff",			required_argument,	0,	'C'},
+	{"level" ,			required_argument,	0,	'l'},
+	{"mode",			required_argument,	0,	'm'},
+	/* SMP options*/
+	{"nthreads",			required_argument,	0,	't'},
+	{"max-heuristic-nthreads",	required_argument,	0,	'T'},
+#ifdef __USE_AFFINITY__
+	{"no-affinity",                 no_argument,            0,      'f'},
+	{"split", 			no_argument,		0,	'b'},
+	{"thread-affinity",		required_argument,	0,	'M'},
+	{"no-shared-core",		no_argument,		0,	'k'},
+#endif
+	/* Print ouptut methods*/
+	{"output-method",		required_argument,	0,	'o'},
+	{"output-length",		required_argument,	0,	'W'},
+	{"verbose",		no_argument,	0,	'v'},
+	{0, 0, 0, 0}
+};
+
+static int (*xali1_ptr)(const struct Profile * const restrict, const unsigned char * const restrict,
+			int * const, const size_t, const size_t, const int, const _Bool);
+static int (*xalip_ptr)( const struct Profile * const restrict, const unsigned char * const restrict,
+           union lScores * const restrict, union Positions * const restrict,
+           union Positions * const restrict, const size_t, const size_t,
+           struct Alignment * const restrict, _Bool * const restrict, const size_t, const size_t, const _Bool,
+           const int, const size_t);
+static int (*xalit_ptr)(const struct Profile * const restrict, const size_t, const size_t, const size_t, const size_t,
+          const unsigned char * const restrict, char * const restrict, union lScores * const restrict,
+          struct Alignment * const restrict, const _Bool * const restrict);
+
+static void* (*thread_heuristic_ptr)(void*);
+
+static void* (*numa_node_ptr)(void*);
+
+SNormalizationItem * Normalization = 0;
+NormalizedToRawFunctionPtr NormalizedToRawFunction = 0;
+RawToNormalizedFunctionPtr RawToNormalizedFunction = 0;
+SAverage * Average = 0;
+unsigned int OutputPrintWidth = 60;
+bool OutputVerbose = false;
+int SearchLevel = 0;
+
+static PrintFunctionPtr PrintFunction = &PrintDefault;
+static pthread_mutex_t PrintLock;
+
+#ifdef __NUMA__
+# define SIMD(x) x ## _sse2
+# define SIMD_VER 2
+# include "numa_threads.h"
+# undef SIMD
+# undef SIMD_VER
+# ifdef __SSE_4_1__
+#  define SIMD(x) x ## _sse41
+#  define SIMD_VER 41
+#  include "numa_threads.h"
+#  undef SIMD
+#  undef SIMD_VER
+# endif
+#endif
+
+#include "threads.h"
+#include "../include/system.h"
+
+static void __attribute__((noreturn)) Usage(FILE * stream)
+{
+  fputs(
+	" pfsearch [options] profile database\n\n"
+	" Options:\n"
+	"  Profile\n" 
+	"   --level                    [-l] : level to use for cutoff\n"
+	"   --mode                     [-m] : mode to use for normalization\n\n"
+	"  Database\n"
+	"   --create-index-database    [-c] : output indices to given file\n"
+	"   --use-index-database       [-i] : use indices stored in given file\n\n"
+	"  Heuristic\n"
+	"   --cutoff                   [-C] : heuristic cutoff value\n"
+	"   --dump-heuristic-scores    [-A] : only print heuristic scores to stdout\n"
+	"   --dump-heuristic-sequences [-D] : dump passed heuristic sequences\n\n"
+	"  Filter\n"
+	"   --dump-filter-scores       [-a] : only print filter scores to stdout\n"
+	"   --dump-filter-sequences    [-d] : dump passed heuristic and filter\n"
+	"                                     sequences\n\n"
+	"  Optimizations\n"
+	"   --sse2                     [-s] : enforces SSE 2 only instruction set\n"
+	"   --nthreads                 [-t] : max number of threads to use\n"
+	"   --max-heuristic-nthreads   [-T] : max number of threads to use for\n"
+	"                                     heuristic phase only. (IO bounds)\n"
+#ifdef __USE_AFFINITY__
+	"   --no-affinity              [-f] : disable CPU affinity file\n"
+	"   --thread-affinity          [-M] : file containing thread mask,\n"
+	"                                     one row for one thread\n" 
+	"   --no-shared-core           [-k] : Prevent core resource sharing\n"
+	"   --split                    [-b] : if both SSE 2 & 4.1 are available,\n"
+	"                                     split half-half using linked resources\n"
+#endif
+#ifdef __NUMA__
+	"   --no-numa                  [-n] : NUMA will be disabled\n"
+	"   --nnodes                   [-N] : NUMA nodes number (maximum is NUMA API)\n"
+	"   --max-heuristic-nnodes     [-S] : NUMA max number of threads per node\n\n"
+#endif
+	"  Printing output\n"
+	"   --output-method            [-o] : printing output method\n"
+	"                                     == 0 replicates the pfseach output without\n"
+    "                                          options (DEFAULT)\n"
+	"                                     == 1 simple ouput\n"
+	"                                     == 2 replicates pfsearch -lxz output\n"
+	"                                     == 3 replicates pfscan -lxz output\n"
+	"                                     == 4 tsv output (single line tab delimited)\n"
+	"   --output-length            [-W] : maximum number of column for sequence\n" 
+	"                                     ouput printing\n"
+	"  Other\n"
+        "   --verbose                  [-v] : verbose on stderr\n"
+	"   --help                     [-h] : output command help\n",
+	
+	
+	stream);
+  exit(0);
+}
+
+int main (int argc, char *argv[])
+{
+  ////////////////////////////////////////////////////////////////////////////////////////////////
+  // LOCAL STRUCTURES
+  ////////////////////////////////////////////////////////////////////////////////////////////////
+  
+  struct Profile prf; 			/* Profile */
+  FASTAStructure FASTA;			/* Sequence Database File */
+  Sequence SeqData;			/* Sequence data to work on */
+  struct timeval _t0, _t1;		/* Timing structures */
+  
+  ////////////////////////////////////////////////////////////////////////////////////////////////
+  // LOCAL DATA
+  ////////////////////////////////////////////////////////////////////////////////////////////////
+  
+  PFSequence * PFSeq;			/* Pointer to translated alphabet sequence */
+  size_t nCPUs=0;			/* number of threads */
+  size_t nCPUsHeuristic=0;              /* maximum number of threads for heuristic phase */
+#ifdef __NUMA__
+  size_t nNodes=0;			/* number of NUMA nodes (max is NUMA API dictated) */
+  size_t nThreadsPerNodes=0;		/* maximum number of threads per NUMA node */
+#endif
+  size_t HeuristicCounter = 0;		/* number of sequences passing heuristic */ 
+  size_t FilterCounter = 0;		/* number of sequences passing filter */ 
+  int res, Score;
+  int HeuristicCutOff = -1;		/* Default heuristic cutoff from command line, if not zero then enforces that value*/
+  _Bool levelGiven = false;		/* True if --level is given */
+  int Level = 0;			/* Default level used from command line, if not zero then enforces that value */
+  int Mode = 0;				/* Default Mode for normalization from command line, if not zero then enforces that value */
+  _Bool SSE41 = true;
+  _Bool ExportIndices = false;		/* Does export indices after analyzing fasta file */
+  char *ExportFileName = NULL;		/* If so this is the file name */
+  _Bool ImportIndices = false;		/* Does import indices from file */
+  char *ImportFileName = NULL;		/* If so this is the file name */
+  _Bool DumpHeuristicOnly = false;	/* If set only dump heuritic scores for each sequence */
+  _Bool DumpFilterOnly = false;         /* If set only dump filter scores for each sequence */
+  _Bool DumpFilterSequences = false;	/* Dump sequence that passed the heuristic */
+  _Bool DumpAlignmentSequences = false;	/* Dump sequence that passed the heuristic and the filter */
+  _Bool DumpBoth            = false;	/* Dump both heuristic and filter scores */
+  int * restrict FilterScores = NULL;   /* Array of filter scores */
+  unsigned int * restrict HeuristicScores = NULL; /* Array of heuristic scores used when dumping both filter and heuristic scores */
+  char * ProfileFile;			/* Profile file */
+  char *DB;				/* FASTA sequence file */
+  
+  size_t * shares = 0;
+  __32bitData * restrict YesNoID = NULL;/* Allocate memory for sequence YesNo or ID to be done */
+  struct ThreadData *threads_arg = NULL;/* Allocate stack memory for posix thread structures */
+  pthread_t *threads = 0;
+#ifdef __USE_AFFINITY__
+  cpu_set_t * Thread_masks[2] = {0,0};	/* Define variables to hold thread affinity mask */
+  unsigned int Thread_count[2] = {0,0}; 
+  pthread_attr_t * restrict threads_attr = NULL;	
+  char buffer[128] __attribute__((aligned(16))); /* buffer to read affinity file mask */
+  _Bool noAffinity = false;		/* disable use of cpu affinity */
+  _Bool split = false;
+  _Bool noSharedCore = false;		/* Prevent hyperthreading or AMD compute unit to share resources */
+  _Bool GivenAffinityFile = false;	/* File holding a mask for each thread */
+  char * AffinityMaskFileName;		/* Name of affinity mask file provided by option m */
+#endif
+#ifdef __USE_MMAP__
+  int fd;
+  size_t length;
+  char * restrict SequenceFileMap;
+#endif
+  
+  ////////////////////////////////////////////////////////////////////////////////////////////////
+  // SYSTEM ARCHITECTURE ANALYSIS
+  ////////////////////////////////////////////////////////////////////////////////////////////////
+  getSystemInfo(&System);
+   
+#ifdef USE_AFFINITY
+/*  Thread_Mask_Size = CPU_ALLOC_SIZE(System.nOverallCores);
+  Thread_masks = (cpu_set_t**) alloca(System.nOverallCores*sizeof(cpu_set_t*));
+  register _Bool Error = false;
+  for (size_t t=0; t<System.nOverallCores; ++t) {
+    Thread_masks[t] = CPU_ALLOC(System.nOverallCores);
+    Error |= Thread_masks[t] == NULL;
+  }
+  if (Error) {
+    printf("Error in allocating thread affinity masks.\n");
+    exit(1);
+  }     
+  for (int t=0; t<(int)System.nOverallCores; ++t) {
+    CPU_ZERO_S(Thread_Mask_Size, Thread_masks[t]);
+    CPU_SET_S(t, Thread_Mask_Size, Thread_masks[t]);
+  }*/ 
+#endif
+
+  /* Check for minimum requirement */
+  if (!(System.Extensions & MM_SSE2)) {
+      fputs("pfsearch requires at least a CPU capable of SSE 2.\n", stderr);
+      exit(1);
+  }
+  
+  /* Allow fast SSE 4.1 extensions ? */
+  if (System.Extensions & MM_SSE41) {
+      xali1_ptr = xali1_sse41;
+      xalit_ptr = xalit_sse41;
+      xalip_ptr = xalip_sse41;
+      //thread_heuristic_cutoff_ptr = thread_heuristic_cutoff_sse41;
+      thread_heuristic_ptr = thread_heuristic_sse41;
+# ifdef __NUMA__
+      numa_node_ptr = numa_node_sse41;
+# endif
+      SSE41 = true;
+  } else {
+      xali1_ptr = xali1_sse2;
+      xalit_ptr = xalit_sse2;
+      xalip_ptr = xalip_sse2;
+      thread_heuristic_ptr = thread_heuristic_sse2;
+#ifdef __NUMA__
+      numa_node_ptr = numa_node_sse2;
+#endif
+  }
+  
+  ////////////////////////////////////////////////////////////////////////////////////////////////
+  // OPTIONS
+  ////////////////////////////////////////////////////////////////////////////////////////////////
+  while (1) {
+    /* getopt_long stores the option index here. */
+    int option_index = 0;
+
+    const int c = getopt_long (argc, argv, opt_to_test, long_options, &option_index);
+
+    /* Detect the end of the options. */
+    if (c == -1) break;
+    switch (c) {
+#ifdef __USE_AFFINITY__
+      case 'f':
+        noAffinity = true; 
+        break;
+      case 'k':
+	noSharedCore = true;
+	break;
+      case 'b':
+	if (SSE41) {
+	  split = true;
+	} else {
+	  fputs("Split not possible without SSE 4.1\n", stderr);
+	  exit(0);
+	}
+	break;
+      case 'M':
+	GivenAffinityFile = true;
+	AffinityMaskFileName = optarg;
+	break;
+      case 'v':
+	OutputVerbose = true;
+	break;
+#endif
+      case 'o':
+	{
+	  const int method = atoi(optarg);
+	  if (method <= 0) {
+	    PrintFunction = &PrintDefault;
+	  } else if (method == 1) {
+	    PrintFunction = &PrintSimple;
+	  } else if (method == 2) {
+	    PrintFunction = &PrintInterpro;
+	  } else if (method == 3) {
+	    PrintFunction = &PrintPfscan;
+	  } else if (method == 4) {
+	    PrintFunction = &PrintTSV;
+	  } else {
+	    fputs("Unrecognized ouput method.\n", stderr);
+	    exit(1);
+	  }
+	}
+	break;
+      case 'W':
+	OutputPrintWidth = (unsigned int) atoi(optarg);
+	break;
+      case 'm':
+	Mode = atoi(optarg);
+	break;
+      case 'l':
+	levelGiven = true;
+	Level = atoi(optarg);
+	SearchLevel = Level;
+	break;
+      case 'a':
+	DumpFilterOnly = true;
+	break;
+      case 'A':
+	DumpHeuristicOnly = true;
+	break;
+      case 't':
+	nCPUs = (size_t) atoi(optarg);
+	break;
+      case 'T':
+	nCPUsHeuristic = (size_t) atoi(optarg);
+	break;
+      case 'D':
+	DumpFilterSequences = true;
+	break;
+      case 'd':
+	DumpAlignmentSequences = true;
+	break;
+      case 's':
+	xali1_ptr = xali1_sse2;
+	xalit_ptr = xalit_sse2;
+	xalip_ptr = xalip_sse2;
+	thread_heuristic_ptr = thread_heuristic_sse2;
+# ifdef __NUMA__
+	numa_node_ptr = numa_node_sse2;
+# endif
+	SSE41 = false;
+	break;
+      case 'c':
+	ExportIndices = true;
+	ExportFileName = optarg;
+	break;
+      case 'i':
+	ImportIndices = true;
+	ImportFileName = optarg;
+	break;
+      case 'C':
+	HeuristicCutOff = atoi(optarg);
+	break;
+#ifdef __NUMA__
+      case 'n':
+	if (System.NumaAble) {
+	  noNUMA = 1;
+	  fputs("NUMA disactivated as requested.\n", stdout);
+	}
+	break;
+      case 'N':
+	if (System.NumaAble) {
+	  nNodes = (size_t) atoi(optarg);
+	  if (nNodes > System.nNodes) {
+	    nNodes = System.nNodes;
+	    if (OutputVerbose)
+            fprintf(stderr, "System cannot have more than %u NUMA nodes, number lowered to system max\n",
+		        System.nNodes);
+	  }
+	}
+	break;
+      case 'S':
+	if (System.NumaAble) {
+	  nThreadsPerNodes = (size_t) atoi(optarg);
+	}
+	break;
+#endif
+      case 'h':
+      default:
+	Usage(stdout);
+    }
+  }
+
+  if (optind == argc) {
+    fputs("Error in given options\n", stderr);
+    Usage(stderr);
+  } else {
+    ProfileFile = argv[optind];
+    DB = argv[optind+1];
+  }
+
+  if (OutputVerbose) {
+   fputs(HEADER 
+#ifdef __USE_MMAP__
+        "| Using Linux kernel MMAP function.                                          |\n"
+#endif
+      ,stderr);
+    printSystemInfo(&System);
+    if (!SSE41 && (System.Extensions & MM_SSE41)) {
+	fputs("Enforcing SSE 2...\n", stderr); 
+    }
+  }
+  ////////////////////////////////////////////////////////////////////////////////////////////////
+  // INPUT ANALYSIS
+  ////////////////////////////////////////////////////////////////////////////////////////////////
+
+  /* 
+   * Read the profile and output some infos
+   */
+  gettimeofday(&_t0,0);
+  res = ReadProfile(ProfileFile, &prf);
+  gettimeofday(&_t1,0);
+  {
+    const double T = (double) (_t1.tv_sec - _t0.tv_sec) + (double) (_t1.tv_usec - _t0.tv_usec) * 0.000001;
+    if (OutputVerbose)
+        fprintf(stderr, "Profile reading took %lf seconds.\n", T);
+  }
+  if (res != 0) {
+    fputs("Error found.\n", stderr);
+    return 1;
+  }
+  if (OutputVerbose)
+    fprintf(stderr,"Profile %s has length %lu and alphabet size of %lu\nCutoff value is set to %i\n",
+         ProfileFile, prf.Length, prf.Alphabet_Length, prf.CutOffData.Values[prf.Level].ICUT);
+
+  if (OutputVerbose)
+  {
+    fputs("Alphabet Mapping\n",stderr);
+    for (size_t i=0; i<ALPHABET_SIZE; ++i) {
+        fprintf(stderr,"Map %c=%2u  ", (char) ((unsigned char) 'A' + (unsigned char) i), (unsigned int) prf.Alphabet_Mapping[i]);
+        if ((i+1) % 8 == 0 ) fputs("\n",stderr);
+    }
+    fputs("\n\n",stderr);
+  fprintf(stderr,"Disjoint set: %i to %i\n", prf.DisjointData.NDIP[0], prf.DisjointData.NDIP[1]);
+  }
+
+  /*
+   * Treats the level of cutoff by seeking the index corresponding to the wanted level number,
+   * then storing it into the profile Level member.
+   * BE CAREFUL THIS IS THE INDEX AND NOT THE VALUE OF THE LEVEL !!!
+   */
+  const SCutOffItem * const restrict cutItems = prf.CutOffData.Values;
+  if (levelGiven) {
+    _Bool levelfound = false;
+    for (size_t icut=0; icut<(size_t)prf.CutOffData.JCUT; ++icut) {
+      if ( cutItems[icut].MCLE == Level ) {
+	prf.Level = icut;
+	if (levelfound) {
+	  fprintf(stderr, "ERROR: profile contains several %i-level!\n", Level);
+	  goto END;
+	}
+	levelfound = true;
+      }
+    }
+    if (! levelfound ) { 
+      fprintf(stderr,"Profile does not contain a level %i.\n", Level);
+      goto END;
+    }
+  }
+  /*
+  * Treats the normalization method 
+  */
+  {
+    const SCutOffItem * const restrict cutItem = &cutItems[prf.Level];
+    if (OutputVerbose)
+        fprintf(stderr, "Normalization count for level %i: %i\n", Level, cutItem->JCNM);
+    if ( cutItem->JCNM > 0 ) {
+      SNormalizationItem *NormItems = &(prf.NormalizationData.Values[0]);
+      
+      register size_t NormalizationMode = 0;
+      int Priority =  -1;//NormItems[NormalizationMode].NNPR;
+      int Mode     =  -1;//NormItems[NormalizationMode].MNOR;
+      
+      for (int iCutoffMode=0; iCutoffMode<cutItem->JCNM; ++iCutoffMode) {
+	const int CutOffMode = cutItem->MCUT[iCutoffMode];
+	for (int iNormalizationMode=0; iNormalizationMode<prf.NormalizationData.JNOR; ++iNormalizationMode) {
+	  if (OutputVerbose)
+	      fprintf(stderr, "Cutoff mode %i, normalization mode %i\n" , CutOffMode, NormItems[iNormalizationMode].NNOR); 
+	  if ( CutOffMode == NormItems[iNormalizationMode].NNOR ) {
+	    if (Mode < 0) {
+	      Priority =  NormItems[NormalizationMode].NNPR;
+	      Mode     =  NormItems[NormalizationMode].MNOR;
+	      NormalizationMode = (size_t) iNormalizationMode;
+	    } 
+	    else if (NormItems[NormalizationMode].NNPR < Priority) {
+	      Priority =  NormItems[NormalizationMode].NNPR;
+	      Mode     =  NormItems[NormalizationMode].MNOR;
+	      NormalizationMode = (size_t) iNormalizationMode;
+	    }
+	  }
+	}
+      }
+      
+      switch(Mode) {
+	case 0:
+	  NormalizedToRawFunction = &N2R_1;
+	  RawToNormalizedFunction = &R2N_1;
+	  if (OutputVerbose)
+	    fprintf(stderr, "Normalization using %s function\n", prf.NormalizationData.CNOR[0]);
+	  break;
+	case 1:
+	  NormalizedToRawFunction = &N2R_2;
+	  RawToNormalizedFunction = &R2N_2;
+	  if (OutputVerbose)
+	    fprintf(stderr, "Normalization using %s function\n", prf.NormalizationData.CNOR[1]);
+	  break;
+	case 2:
+	  NormalizedToRawFunction = &N2R_3;
+	  RawToNormalizedFunction = &R2N_3;
+	  if (OutputVerbose)
+	    fprintf(stderr, "Normalization using %s function\n", prf.NormalizationData.CNOR[2]);
+	  InitAverage(&(prf.Scores), prf.Length, prf.Alphabet_Length, Average);
+	  if (Average == 0) {
+	    fputs("Unable to allocate memory for normalization averaging.n", stderr);
+	    goto END;
+	  }
+	  break;
+	default:
+	  fprintf(stderr, "No normalization data satisfies level %i modes.\n", Level);
+  // 	NormalizedToRawFunction = 0;
+  // 	RawToNormalizedFunction = 0;
+	  goto END;
+      }
+      Normalization = &NormItems[NormalizationMode];
+      if (OutputVerbose)
+      {
+        fprintf(stderr, "Normalization Mode %i with coeffs: ", Normalization->NNOR);
+        for (int c=0; c<5; ++c) fprintf(stderr,"%f ", Normalization->RNOP[c]);
+        fputs("\n", stderr);
+      }
+      prf.Mode = NormalizationMode;
+    }
+  }
+  /* 
+   * Read the FASTA file 
+   */
+  
+  gettimeofday(&_t0,0);
+  if (!ImportIndices) {
+    res = AnalyzeFASTAStructure(DB, &FASTA);
+  } else {
+    FILE* inIndex = fopen(ImportFileName, "rb");
+    if (inIndex != NULL) {
+      res = ImportFASTAStructure(inIndex, &FASTA);
+      fclose(inIndex);
+    } else {
+      if (OutputVerbose)
+        fprintf(stderr,"Unable to open index file %s, will analyze database instead.\n",ImportFileName); 
+      res = AnalyzeFASTAStructure(DB, &FASTA);
+    }
+  }
+  gettimeofday(&_t1,0);
+  {
+    const double T = (double) (_t1.tv_sec - _t0.tv_sec) + (double) (_t1.tv_usec - _t0.tv_usec) * 0.000001;
+    if (OutputVerbose)
+        fprintf(stderr, "Sequence file indexing took %lf seconds.\n", T);
+  }
+  if (res != 0) {
+    fputs("Error found.\n", stderr);
+    return 1;
+  }
+  
+  if (OutputVerbose)
+  {
+    fprintf(stderr,
+	  "FASTA file %s analyzed\n"
+	  "\tFound %lu sequences within %lu bytes\n" 
+	  "\tBiggest sequence entry is %lu bytes\n",
+          DB, FASTA.SequenceCount, FASTA.FileSize, FASTA.MaxSequenceSize);
+  }
+  
+  if (ExportIndices) {
+    FILE *io = fopen(ExportFileName, "wb");
+    if ( io != NULL ) {
+      if (ExportFASTAStructure(io, &FASTA)>0) {
+        if (OutputVerbose)
+            fprintf(stderr, "Export of indices failed, check space for %s\n", ExportFileName);
+      } else {
+        if (OutputVerbose)
+	        fprintf(stderr, "Export of indices to file %s\n", ExportFileName);
+      }
+      fclose(io);
+    } else {
+        if (OutputVerbose)
+            fprintf(stderr, "Export of indices failed, check write permission for %s\n", ExportFileName);
+    }
+  }
+  
+#ifdef __NUMA__
+  if (!(System.NumaAble && noNUMA == 0)) {
+#endif
+  ////////////////////////////////////////////////////////////////////////////////////////////////
+  ////////////////////////////////////////////////////////////////////////////////////////////////
+  //                                       NOT NUMA                                             //
+  ////////////////////////////////////////////////////////////////////////////////////////////////
+  ////////////////////////////////////////////////////////////////////////////////////////////////
+  
+  /* 
+   * Retrieve number of cores 
+   */
+  nCPUs = (nCPUs == 0) ? (size_t) System.nOverallCores : nCPUs;
+  
+#ifdef __USE_AFFINITY__
+  if (noAffinity) {
+    // -----------------------------------------------------------------------------
+    //                        ***  NO AFFINITY ***
+    // -----------------------------------------------------------------------------
+    if (OutputVerbose)
+        fputs("Thread affinity disabled\n", stderr); 
+    Thread_count[0] = System.nOverallCores;
+    Thread_masks[0] = (cpu_set_t*) malloc(System.nOverallCores*sizeof(cpu_set_t));
+    for (size_t thread=0; thread<System.nOverallCores; ++thread) {
+      CPU_ZERO(&Thread_masks[0][thread]);
+      for (int i=0; i<(int) System.nOverallCores; ++i) CPU_SET(i, &Thread_masks[0][thread]);
+    }
+  } else if (GivenAffinityFile) {
+    // -----------------------------------------------------------------------------
+    //                     ***  INPUT FILE HOLDING NASKS ***
+    // -----------------------------------------------------------------------------
+    if (OutputVerbose)
+        fprintf(stderr,"Parsing file %s for affinity mask and number of threads\n", AffinityMaskFileName);
+    FILE* in = fopen(AffinityMaskFileName, "r");
+    if (in == NULL) {
+	fprintf(stderr, "Cannot open thread affinity file %s.\n", optarg);
+	exit(1);
+    }
+    size_t lines = 0;
+    while (!feof(in)) {
+	int num = fread(buffer, sizeof(char), 64, in);
+	for (unsigned int i=0; i<num; i++)
+	    if (buffer[i] == '\n') lines++;
+    }
+    rewind(in);
+    if (lines != 0) {
+	if (lines > System.nOverallCores) lines = System.nOverallCores;
+	Thread_masks[0] = (cpu_set_t*) malloc(lines*sizeof(cpu_set_t));
+	for (size_t i=0; i<lines; i++) {
+	    fscanf(in, "%s\n", buffer);
+	    const size_t tmp_size = strlen(buffer) - 1;
+	    CPU_ZERO(&Thread_masks[0][i]);
+	    for (int j=tmp_size; j>=0; j--) {
+		if (buffer[j] != '0') CPU_SET(j, &Thread_masks[0][i]);
+	    }
+	}
+	Thread_count[0] = lines;
+    if (OutputVerbose)
+	    fprintf(stderr,"Found %2lu threads affinity masks.",nCPUs);
+    } else {
+    if (OutputVerbose)
+	    printf("Cannot understand cpu mask, keep on normally\n");
+    }
+    fclose(in);
+  } else if ( split ) {
+    // -----------------------------------------------------------------------------
+    //                 ***  HALF SSE 2 HALF SSE 4.1 HYPERTHREADING***
+    // -----------------------------------------------------------------------------
+    Thread_count[0] = getMasks(&System, -1, -1, 1, &Thread_masks[0]);
+    if (Thread_count[0] == 0) {
+      fputs("No potential affinity mask found !!!\n", stderr);
+      exit(0);
+    }
+    Thread_count[1] = getMasks(&System, -1, -1, 2, &Thread_masks[1]);
+    if (Thread_count[1] == 0) {
+      fputs("No potential affinity mask found with hyperthreading !!!\n", stderr);
+      exit(0);
+    }
+    if (OutputVerbose)
+        fprintf(stderr, "%u threads will use SSE 4.1 and %u SSE 2\n", Thread_count[0], Thread_count[1]);
+  } else if (noSharedCore) {
+    if (OutputVerbose)
+        fputs("No sharing of core resources will be used: Intel Hyperthreading or AMD Compute Unit\n", stderr);
+    Thread_count[0] = getMasks(&System, -1, -1, 1, &Thread_masks[0]);
+    if (Thread_count[0] == 0) {
+      fputs("No potential affinity mask found !!!\n", stderr);
+      exit(0);
+    }
+  } else {
+    // -----------------------------------------------------------------------------
+    //                        *** OPERATING SYSTEM CHOICE ***
+    // -----------------------------------------------------------------------------
+    Thread_count[0] = getMasks(&System, -1, -1, -1, &Thread_masks[0]);
+    if (Thread_count[0] == 0) {
+      fputs("No potential affinity mask found !!!\n", stderr);
+      exit(0);
+    }
+  }
+
+  {
+    register size_t total = (size_t) (Thread_count[0] + Thread_count[1]);
+    if (nCPUs > total) nCPUs = total;
+  }
+      
+  threads_attr = (pthread_attr_t*) alloca(nCPUs*sizeof(pthread_attr_t));
+  {
+    register const cpu_set_t * current = &Thread_masks[0][0]; 
+    for (size_t i=0; i<nCPUs; ++i) {
+      pthread_attr_init(&threads_attr[i]);
+      if (i == (size_t) Thread_count[0]) current = &Thread_masks[1][0];
+      pthread_attr_setaffinity_np(&threads_attr[i], sizeof(cpu_set_t), current);
+      ++current;
+    }
+  } 
+#endif
+  if (OutputVerbose)
+    fprintf(stderr, "Job dispatched over %lu cores.\n", nCPUs);
+  
+#ifdef __USE_MMAP__
+  fd = open(DB, O_RDONLY );
+  length = (size_t) FASTA.FileSize;
+  SequenceFileMap = (char *) mmap(NULL, length, PROT_READ, MAP_PRIVATE, fd, 0);
+  if (SequenceFileMap == NULL) {
+    fputs("Unable to map sequence file to memory\n", stderr);
+    exit(1);
+  } 
+#endif
+  ////////////////////////////////////////////////////////////////////////////////////////////////
+  // HEURISTIC
+  ////////////////////////////////////////////////////////////////////////////////////////////////
+
+  /* Get Heuristic cutoff from command line */
+  if (HeuristicCutOff >= 0) prf.CutOffData.Values[prf.Level].HCUT = (unsigned int) HeuristicCutOff;
+  if (OutputVerbose)
+    fprintf(stderr,"Heuristic cutoff set to %u\n", prf.CutOffData.Values[prf.Level].HCUT);
+
+  /* Prepare structure common to filter and alignment */
+  shares = alloca((nCPUs+1)*sizeof(size_t));
+  
+  /* Allocate memory for sequence YesNo or ID to be done */
+  YesNoID = _mm_malloc( FASTA.SequenceCount*sizeof(__32bitData), 16);
+  if (YesNoID == NULL) {
+      fputs("Cannot allocate memory.\n", stderr);
+      goto END;
+  }
+    
+  /* Allocate stack memory for posix thread structures */
+  threads_arg = alloca(nCPUs*sizeof(struct ThreadData));
+  threads = (pthread_t*) alloca(nCPUs*sizeof(pthread_t));
+  
+  /* Dispatch to threads */
+    for (size_t i=0; i<nCPUs; ++i) {
+      threads_arg[i].prf                       = &prf;
+      threads_arg[i].FASTA                     = &FASTA;
+      threads_arg[i].Array                     = YesNoID;
+#ifdef __USE_MMAP__
+      threads_arg[i].SequenceFileMap           = SequenceFileMap;
+# ifdef NUMA_DEBUG
+      threads_arg[i].maplength                 = &length;
+# endif
+#else
+      threads_arg[i].SequenceFileName          = DB;
+#endif
+      threads_arg[i].threadId                  = i;
+    }
+  
+  DumpBoth = DumpHeuristicOnly && DumpFilterOnly;
+  if (prf.CutOffData.Values[prf.Level].HCUT > 0 || DumpHeuristicOnly && !DumpFilterOnly) {
+    /* Compute Match Score Matrix transpose */ 
+    gettimeofday(&_t0,0);
+    TransposeMatrix TIMatch;
+#ifdef __USE_AFFINITY__
+    TransposeMatrix TIMatch1;
+    if (split) {
+      TIMatch.i  = TransposeAndConvertMatchMatrix(&(prf.Scores), prf.Alphabet_Length, prf.Length);
+      TIMatch1.f = TransposeAndConvertToFloatMatchMatrix(&(prf.Scores), prf.Alphabet_Length, prf.Length);
+    } else 
+#endif
+    if (SSE41) {
+      TIMatch.i = TransposeAndConvertMatchMatrix(&(prf.Scores), prf.Alphabet_Length, prf.Length);
+    } else {
+      TIMatch.f = TransposeAndConvertToFloatMatchMatrix(&(prf.Scores), prf.Alphabet_Length, prf.Length);
+    }
+    gettimeofday(&_t1,0);
+    {
+      const double t = (double) (_t1.tv_sec - _t0.tv_sec) + (double) (_t1.tv_usec - _t0.tv_usec) * 0.000001;
+      if (OutputVerbose)
+        fprintf(stderr,"Transposing Match matrix took %lf seconds.\n", t);
+    }
+    
+    /* Limit number of threads for heuristic */
+    if ( nCPUsHeuristic == 0) nCPUsHeuristic = nCPUs;
+    
+    /* Share according to file size */
+    {
+      size_t FileShare = (size_t) FASTA.FileSize / nCPUsHeuristic;
+      FileShare += ((size_t) FASTA.FileSize % nCPUsHeuristic) > (nCPUsHeuristic-1) ? 1 : 0;
+      const s_Data * DataPtr = FASTA.DataPtr;
+      register size_t counter = 0;
+      shares[0] = 0;
+      for (size_t i=1; i<nCPUsHeuristic; ++i) {
+	register size_t tmp = i*FileShare;
+	while ( (size_t) DataPtr->Offset < tmp) { ++DataPtr; ++counter; }
+	shares[i] = counter;
+      }
+      shares[nCPUsHeuristic] = FASTA.SequenceCount;
+    }
+    
+    gettimeofday(&_t0,0);
+#ifdef __USE_AFFINITY__
+    if (split) {
+      for (size_t i=0; i<Thread_count[0]; ++i) {
+	threads_arg[i].start                     = shares[i];
+	threads_arg[i].stop                      = shares[i+1];
+	threads_arg[i].TransposeMatch            = TIMatch;
+	if (pthread_create (&threads[i],  &threads_attr[i], thread_heuristic_sse41,  (void*) &threads_arg[i]) != 0) 
+	{
+	  fputs("Fail to create thread.\n", stderr);
+	  exit(0);
+	}
+      }
+      for (size_t i=0; i<Thread_count[1]; ++i) {
+	threads_arg[Thread_count[0]+i].start                     = shares[Thread_count[0]+i];
+	threads_arg[Thread_count[0]+i].stop                      = shares[Thread_count[0]+i+1];
+	threads_arg[Thread_count[0]+i].TransposeMatch            = TIMatch1;
+	if (pthread_create (&threads[Thread_count[0]+i],  &threads_attr[Thread_count[0]+i], thread_heuristic_sse2,  (void*) &threads_arg[Thread_count[0]+i]) != 0) 
+	{
+	  fputs("Fail to create thread.\n", stderr);
+	  exit(0);
+	}
+      }
+    } else {
+#endif
+      for (size_t i=0; i<nCPUsHeuristic; ++i) {
+	threads_arg[i].start                     = shares[i];
+	threads_arg[i].stop                      = shares[i+1];
+	threads_arg[i].TransposeMatch            = TIMatch;
+#ifdef __USE_AFFINITY__
+	if (pthread_create (&threads[i],  &threads_attr[i], thread_heuristic_ptr,  (void*) &threads_arg[i]) != 0) 
+#else
+	if (pthread_create (&threads[i],  NULL, thread_heuristic_ptr,  (void*) &threads_arg[i]) != 0) 
+#endif
+	{
+	  fputs("Fail to create thread.\n", stderr);
+	  exit(0);
+	}
+      }
+#ifdef __USE_AFFINITY__ 
+    }
+#endif
+    for (size_t i=0; i<nCPUsHeuristic; ++i) {
+      pthread_join(threads[i], NULL);  
+    }
+    gettimeofday(&_t1,0);
+    double t = (double) (_t1.tv_sec - _t0.tv_sec) + (double) (_t1.tv_usec - _t0.tv_usec) * 0.000001;
+    
+    _mm_free(TIMatch.f);
+#ifdef __USE_AFFINITY__
+    if (split) _mm_free(TIMatch1.f);
+#endif
+    
+    /* Do we go for dump only, then output and quit */
+    if (DumpHeuristicOnly && !DumpBoth) {
+      /* Allocate memory to hold sequence */
+      SeqData.Data.Memory = malloc(FASTA.MaxSequenceSize*sizeof(unsigned char));
+      if (SeqData.Data.Memory == NULL) {
+	fputs("Thread Cannot allocate memory for sequence.\n", stderr);
+	_mm_free(YesNoID);
+	goto END;
+      }
+      
+      /* Open sequence file*/
+#ifndef __USE_MMAP__
+      FILE* inSequence = fopen(DB, "r");
+#endif    
+
+      for (size_t iseq=0; iseq<FASTA.SequenceCount; ++iseq) {
+	/* Read sequence */
+#  ifndef __USE_MMAP__
+	PFSeq = ReadSequenceIndex(&SeqData, iseq, inSequence, FASTA.DataPtr);
+#  else
+	PFSeq = MMAPReadSequenceIndex(&SeqData, iseq, SequenceFileMap, FASTA.DataPtr, 0
+#    ifdef MMAP_DEBUG
+      , ((struct ThreadData*) _Data)->threadId, 0, *(((struct ThreadData*) _Data)->maplength)
+#    endif
+      );
+#  endif
+	/* Translate first sequence */
+	PFSeq = TranslateSequenceToIndex(PFSeq, prf.Alphabet_Mapping);
+	
+	char * ptr = SeqData.Data.Header;
+	while (*ptr != ' ' && *ptr != '\n') ptr++;
+	if (*ptr == ' ') *ptr = '\0';
+	
+	/* Ouput results */
+	fprintf(stdout, "%u\t%s\n", YesNoID[iseq].UnsignedScores, SeqData.Data.Header);
+      }
+      
+#ifndef __USE_MMAP__
+      fclose(inSequence);
+#endif  
+      _mm_free(YesNoID);
+      free(SeqData.Data.Memory);
+      goto END;
+    }
+    
+    if (DumpBoth) {
+       HeuristicCounter = FASTA.SequenceCount;
+       HeuristicScores = _mm_malloc(FASTA.SequenceCount*sizeof(unsigned int), 16);
+       if ( HeuristicScores == NULL) {
+	 fputs("Unable to allocate memory for the heuristic scores\n",stderr);
+	  exit(1);
+       }
+       memcpy(HeuristicScores, YesNoID, FASTA.SequenceCount*sizeof(unsigned int));
+    }
+ 
+    /* Gather the one that passed th1e heuristic */
+    HeuristicCounter = 0;
+    register const unsigned int lHeuristicCutOff = prf.CutOffData.Values[prf.Level].HCUT;
+    for (size_t iseq=0; iseq<FASTA.SequenceCount; ++iseq) {
+      if (YesNoID[iseq].UnsignedScores >= lHeuristicCutOff) {
+	YesNoID[HeuristicCounter].ToDoID = (unsigned int) iseq;
+	++HeuristicCounter;
+      }
+    }
+
+    if (OutputVerbose)
+        fprintf(stderr,"Overall there are %lu/%lu sequences passing heuristic. These took %lf seconds to treat on %lu cores.\n",
+	    HeuristicCounter, FASTA.SequenceCount, t, nCPUsHeuristic);
+    
+    /* Print out the sequences passing heuristic cutoff */
+    if (DumpFilterSequences) {
+      /* Allocate memory to hold sequence */
+      SeqData.Data.Memory = malloc(FASTA.MaxSequenceSize*sizeof(unsigned char));
+      if (SeqData.Data.Memory == NULL) {
+	fputs("Program cannot allocate memory for sequence.\n", stderr);
+	_mm_free(YesNoID);
+	goto END;
+      }
+      
+#ifndef __USE_MMAP__
+      FILE* inSequence = fopen(DB, "r");
+#endif
+      
+      for (size_t iseq=0; iseq<HeuristicCounter; ++iseq) {
+	  /* Read sequence */
+	  const size_t sequence_index = YesNoID[iseq].ToDoID;
+#ifndef __USE_MMAP__
+	  PFSeq = ReadSequenceIndex(&SeqData, sequence_index, inSequence, FASTA.DataPtr);
+#else
+	  PFSeq = MMAPReadSequenceIndex(&SeqData, sequence_index, SequenceFileMap, FASTA.DataPtr, 0
+#  ifdef MMAP_DEBUG
+      , ((struct ThreadData*) _Data)->threadId, 0, *(((struct ThreadData*) _Data)->maplength)
+#  endif
+      );
+#endif
+	  /* Ouput results */
+	  fprintf(stdout, "%s\n%s\n", SeqData.Data.Header, SeqData.ProfileData.ProfileIndex);
+	}
+#ifndef __USE_MMAP__
+      fclose(inSequence);
+#endif
+      free(SeqData.Data.Memory);
+      goto END;
+    }
+    if (DumpBoth) {
+      HeuristicCounter = FASTA.SequenceCount;
+      for (size_t iseq=0; iseq<FASTA.SequenceCount; ++iseq) {
+	 YesNoID[iseq].ToDoID  = (unsigned int) iseq;
+      }
+    }
+  }  else {
+    if (OutputVerbose)
+        fputs("Bypassing heuristic computation...\n",stderr);
+    HeuristicCounter = FASTA.SequenceCount;
+    for (size_t iseq=0; iseq<FASTA.SequenceCount; ++iseq) YesNoID[iseq].ToDoID = (unsigned int) iseq;
+  }
+  ////////////////////////////////////////////////////////////////////////////////////////////////
+  // FILTER
+  ////////////////////////////////////////////////////////////////////////////////////////////////
+  {
+    if (OutputVerbose)
+        fprintf(stderr,"Filter cutoff set to %i\n", prf.CutOffData.Values[prf.Level].ICUT);
+    
+    /* Allocate memory for the filter scores */
+    FilterScores = _mm_malloc(HeuristicCounter*sizeof(int), 16);
+    if (FilterScores == NULL) {
+      fputs("Unable to allocate memory for the filter scores\n",stderr);
+      exit(1);
+    }
+    
+    /* Compute the new share for each thread */
+    size_t SequenceShare = HeuristicCounter / nCPUs;
+    SequenceShare += (HeuristicCounter % nCPUs) > (nCPUs-1) ? 1 : 0;
+    shares[0] = 0;
+    for (size_t i=1; i<nCPUs; ++i) shares[i] = i*SequenceShare;
+    
+    shares[nCPUs] = HeuristicCounter;
+    
+    /* Dispatch to threads */
+    {
+      const unsigned int realFilterScore = DumpFilterOnly ? 1 : 0;
+      gettimeofday(&_t0,0);
+      for (size_t i=0; i<nCPUs; ++i) {
+	threads_arg[i].start        = shares[i];
+	threads_arg[i].stop         = shares[i+1];
+	threads_arg[i].FilterScores = FilterScores;
+	threads_arg[i].counter      = realFilterScore;
+	if (pthread_create (&threads[i],
+#ifdef __USE_AFFINITY__	
+			    &threads_attr[i],
+#else
+			    NULL,
+#endif
+			    thread_xali1,
+			    (void*) &threads_arg[i]) != 0) 
+	{
+	  return 1;
+	}
+      }
+    }
+
+    for (size_t i=0; i<nCPUs; i++) {
+      pthread_join(threads[i], NULL);  
+    }
+
+    gettimeofday(&_t1,0);
+
+    if (DumpFilterOnly) {
+      /* Allocate memory to hold sequence */
+      SeqData.Data.Memory = malloc(FASTA.MaxSequenceSize*sizeof(unsigned char));
+      if (SeqData.Data.Memory == NULL) {
+	fputs("Pfsearch cannot allocate memory for sequence.\n", stderr);
+	_mm_free(YesNoID);
+	_mm_free(FilterScores);
+	goto END;
+      }
+      
+      /* Open sequence file*/
+#ifndef __USE_MMAP__
+      FILE* inSequence = fopen(DB, "r");
+#endif    
+
+      for (size_t iseq=0; iseq<HeuristicCounter; ++iseq) {
+	/* Read sequence */
+#  ifndef __USE_MMAP__
+	PFSeq = ReadSequenceIndex(&SeqData,iseq, inSequence, FASTA.DataPtr);
+#  else
+	PFSeq = MMAPReadSequenceIndex(&SeqData, iseq, SequenceFileMap, FASTA.DataPtr, 0
+#    ifdef MMAP_DEBUG
+      , ((struct ThreadData*) _Data)->threadId, 0, *(((struct ThreadData*) _Data)->maplength)
+#    endif
+      );
+#  endif
+	/* Translate first sequence */
+	PFSeq = TranslateSequenceToIndex(PFSeq, prf.Alphabet_Mapping);
+	
+	char * ptr = SeqData.Data.Header;
+	while (*ptr != ' ' && *ptr != '\n') ptr++;
+	if (*ptr == ' ') *ptr = '\0';
+	
+	/* Ouput results */
+	if (DumpBoth) 
+	  fprintf(stdout, "%u\t%i\t%s\n", HeuristicScores[iseq], FilterScores[iseq], SeqData.Data.Header);
+	else 
+	  fprintf(stdout, "%i\t%s\n", FilterScores[iseq], SeqData.Data.Header);
+      }
+      
+#ifndef __USE_MMAP__
+      fclose(inSequence);
+#endif  
+      _mm_free(YesNoID);
+      free(SeqData.Data.Memory);
+      _mm_free(FilterScores);
+      if (DumpBoth) _mm_free(HeuristicScores);
+      goto END;
+    } 
+    
+    
+    /* Gather the one that passed xali1 */
+    FilterCounter = 0;
+    register const int lFilterCutoff = prf.CutOffData.Values[prf.Level].ICUT;
+    for (size_t iseq=0; iseq<HeuristicCounter; ++iseq) {
+	if ( FilterScores[iseq] >= lFilterCutoff ) {
+	  YesNoID[FilterCounter].ToDoID = YesNoID[iseq].ToDoID;
+	  ++FilterCounter;
+	}
+    }
+    
+    const double t = (double) (_t1.tv_sec - _t0.tv_sec) + (double) (_t1.tv_usec - _t0.tv_usec) * 0.000001;
+    if (OutputVerbose)
+        fprintf(stderr,"Overall there are %lu/%lu sequences passing filter. These took %lf seconds to treat on %li cores.\n",
+	    FilterCounter, HeuristicCounter, t, nCPUs);
+    
+    /* Print out the sequences passing heuristic and filter cutoff */
+    if (DumpAlignmentSequences) {
+      /* Allocate memory to hold sequence */
+      SeqData.Data.Memory = malloc(FASTA.MaxSequenceSize*sizeof(unsigned char));
+      if (SeqData.Data.Memory == NULL) {
+	fputs("Program cannot allocate memory for sequence.\n", stderr);
+	_mm_free(YesNoID);
+	goto END;
+      }
+      
+#ifndef __USE_MMAP__
+      FILE* inSequence = fopen(DB, "r");
+#endif
+      
+      for (size_t iseq=0; iseq<FilterCounter; ++iseq) {
+	  /* Read sequence */
+	  const size_t sequence_index = YesNoID[iseq].ToDoID;
+#ifndef __USE_MMAP__
+	  PFSeq = ReadSequenceIndex(&SeqData, sequence_index, inSequence, FASTA.DataPtr);
+#else
+	  PFSeq = MMAPReadSequenceIndex(&SeqData, sequence_index, SequenceFileMap, FASTA.DataPtr, 0
+#  ifdef MMAP_DEBUG
+      , ((struct ThreadData*) _Data)->threadId, 0, *(((struct ThreadData*) _Data)->maplength)
+#  endif
+      );
+#endif
+	  /* Ouput results */
+	  fprintf(stdout, "%s\n%s\n", SeqData.Data.Header, SeqData.ProfileData.ProfileIndex);
+	}
+#ifndef __USE_MMAP__
+      fclose(inSequence);
+#endif
+      free(SeqData.Data.Memory);
+      _mm_free(FilterScores);
+      goto END;
+    }    
+    _mm_free(FilterScores);
+    
+  }
+  ////////////////////////////////////////////////////////////////////////////////////////////////
+  // ALIGNMENT
+  ////////////////////////////////////////////////////////////////////////////////////////////////
+  if (FilterCounter > 0) {
+    /* Initialize the print mutex */
+    pthread_mutex_init(&PrintLock, NULL);
+    
+    /* Allocate memory for the alignment */
+    const size_t AlignedSequencesStep = NALI*(prf.Length+1)*3;
+    char * AlignedSequences = malloc(nCPUs*AlignedSequencesStep*sizeof(char));
+    if (AlignedSequences == NULL) {
+      fputs("Unable to allocate memory for resulting aligned sequences.\n", stderr);
+      exit(1);
+    }
+    
+    /* Compute the new share for each thread */
+    {
+      size_t SequenceShare = FilterCounter / nCPUs;
+      SequenceShare += (FilterCounter % nCPUs) > (nCPUs-1) ? 1 : 0;
+      shares[0] = 0;
+      for (size_t i=1; i<nCPUs; ++i) {
+	shares[i] = i*SequenceShare;
+//  	fprintf(stderr,"share %lu starts at %lu and stops at %lu\n", i, shares[i-1], shares[i]);
+      }
+      shares[nCPUs] = FilterCounter;
+//       fprintf(stderr,"share %lu starts at %lu and stops at %lu\n", nCPUs, shares[nCPUs-1], shares[nCPUs]);
+    }
+  
+    /* Dispatch to threads */
+    gettimeofday(&_t0,0); 
+    for (size_t i=0; i<nCPUs; ++i) {
+      threads_arg[i].Sequences   = &AlignedSequences[i*AlignedSequencesStep];
+      threads_arg[i].start       = shares[i];
+      threads_arg[i].stop        = shares[i+1];
+#ifdef __USE_AFFINITY__
+      if (pthread_create (&threads[i],  &threads_attr[i], thread_xaliPT,  (void*) &threads_arg[i]) != 0)
+#else
+      if (pthread_create (&threads[i],  NULL, thread_xaliPT,  (void*) &threads_arg[i]) != 0)
+#endif
+      {
+	return 1;
+      }
+    }
+
+    for (size_t i=0; i<nCPUs; i++) {
+      pthread_join(threads[i], NULL);  
+    }
+    gettimeofday(&_t1,0);
+   
+    unsigned int AlignedSequencesCounter = threads_arg[0].counter;
+    for (size_t i=1; i<nCPUs; i++) AlignedSequencesCounter += threads_arg[i].counter;
+    
+    {
+      const double t = (double) (_t1.tv_sec - _t0.tv_sec) + (double) (_t1.tv_usec - _t0.tv_usec) * 0.000001;
+      if (OutputVerbose)
+        fprintf(stderr,"Overall there are %u aligned sequences found. These took %lf seconds to align on %li cores.\n", AlignedSequencesCounter, t, nCPUs);
+    }
+    
+    /* Free the print mutex */
+    pthread_mutex_destroy(&PrintLock);
+  }
+
+  _mm_free(YesNoID);
+#ifdef __USE_MMAP__
+  munmap((void*)SequenceFileMap, length);
+  close(fd);
+#endif
+#ifdef __USE_AFFINITY__
+  if (Thread_masks[0]) free(Thread_masks[0]);
+  if (Thread_masks[1]) free(Thread_masks[1]);
+#endif
+#ifdef __NUMA__
+  } 
+  else 
+  {
+  unsigned int * restrict SeqID = NULL;   
+  ////////////////////////////////////////////////////////////////////////////////////////////////
+  ////////////////////////////////////////////////////////////////////////////////////////////////
+  //                                        NUMA                                                //
+  ////////////////////////////////////////////////////////////////////////////////////////////////
+  ////////////////////////////////////////////////////////////////////////////////////////////////
+  
+  size_t nHeuristicPassed, nFilterPassed;
+  numa_set_strict(1);
+  
+  ////////////////////////////////////////////////////////////////////////////////////////////////
+  // Initialization
+  ////////////////////////////////////////////////////////////////////////////////////////////////
+  pthread_mutex_init(&NodeMutex, NULL);
+  pthread_cond_init(&NodeCond, NULL);
+  pthread_mutex_init(&MasterMutex, NULL);
+  pthread_cond_init(&MasterCond, NULL);
+  
+  nNodes = (nNodes == 0) ? (size_t) System.nNodes : nNodes;
+  nThreadsPerNodes = (nThreadsPerNodes == 0) ? (size_t) System.nCpusPerNode : nThreadsPerNodes;
+  
+  if (nCPUs != 0) {
+      if (OutputVerbose)
+        fputs("In NUMA mode --nthreads is useless, try setting --nnodes instead\n", stderr);
+  }
+//   nCPUs = (nCPUs == 0) ? (size_t) sysconf(_SC_NPROCESSORS_CONF) : nCPUs;
+  nCPUs = nNodes*nThreadsPerNodes;
+  
+  ////////////////////////////////////////////////////////////////////////////////////////////////
+  // Node memory allocation
+  ////////////////////////////////////////////////////////////////////////////////////////////////
+  
+  /* Share according to file size */  
+  size_t * Shares = alloca((nCPUs+1)*sizeof(size_t));
+  {
+    size_t FileShare = (size_t) FASTA.FileSize / nCPUs;
+    FileShare += ((size_t) FASTA.FileSize % nCPUs) > (nCPUs-1) ? 1 : 0;
+    const s_Data * DataPtr = FASTA.DataPtr;
+    size_t counter = 0;
+    Shares[0] = 0;
+    for (size_t i=1; i<nCPUs; ++i) {
+      register size_t tmp = i*FileShare;
+      while ( (size_t) DataPtr->Offset < tmp) { ++DataPtr; ++counter; }
+      Shares[i] = counter;
+//       printf("NodeShares %i starts at %li and stops at %li\n", i, Shares[i-1], counter);
+    }
+    Shares[nCPUs] = FASTA.SequenceCount;
+//     printf("NodeShares %i starts at %li and stops at %li\n", nCPUs, Shares[nCPUs-1], Shares[nCPUs]);
+  }
+  
+  /* Allocation is based upon the maximum requested for all nodes */
+  size_t MaxNodeShare = 0, NodeShare = 0; //, nNodes = 1;
+  for (size_t i=1; i<=nCPUs; ++i) {
+    NodeShare += Shares[i];
+    if ( i % nThreadsPerNodes == 0 ) {
+	MaxNodeShare = MaxNodeShare < NodeShare ? NodeShare : MaxNodeShare;
+	NodeShare = 0;
+// 	if ( nCPUs-i > 0 ) ++nNodes;
+    } 
+  }
+  MaxNodeShare = MaxNodeShare < NodeShare ? NodeShare : MaxNodeShare;
+     
+  if (OutputVerbose)
+    fprintf(stderr, "Job dispatched over %lu cores using %lu/%u nodes each having %lu/%u threads.\n",
+	  nCPUs, nNodes, System.nNodes, nThreadsPerNodes, System.nCpusPerNode);
+  
+  __32bitData ** YesNoID = (__32bitData**) alloca(nNodes*sizeof(__32bitData*));
+  register _Bool OK = true;
+  for (size_t i=0; i<nNodes; ++i) {
+      YesNoID[i] = numa_alloc_onnode(MaxNodeShare*sizeof(__32bitData), i);
+      OK &= YesNoID[i] != NULL ? true : false;
+  }
+  if (!OK) {
+      fputs("NUMA local allocation on nodes was not possible, not enough memory.\n", stderr);
+      exit(1);
+  }
+  
+  ////////////////////////////////////////////////////////////////////////////////////////////////
+  // HEURISTIC
+  ////////////////////////////////////////////////////////////////////////////////////////////////
+
+  /* Get Heuristic cutoff from command line */
+  prf.HeuristicCutOff = HeuristicCutOff;
+  printf("Heuristic cutoff set to %f\n", prf.HeuristicCutOff);
+  
+  /* Allocate stack memory for posix thread structures */
+  struct numa_NodeData *threads_arg = alloca(nNodes*sizeof(struct numa_NodeData));
+  pthread_t *threads = (pthread_t*) alloca(nNodes*sizeof(pthread_t));
+  
+  NodeCounter = nNodes;
+
+  /* Dispatch to threads */
+  gettimeofday(&_t0,0);
+  for (size_t i=0; i<nNodes; ++i) {
+    threads_arg[i].prf                       = &prf;
+    threads_arg[i].FASTA                     = &FASTA;
+    threads_arg[i].Array                     = YesNoID[i];
+    threads_arg[i].SequenceFileName          = DB;
+    threads_arg[i].shares                    = Shares;
+    threads_arg[i].NodeId                    = i;
+    threads_arg[i].shareStart                = i*nThreadsPerNodes;
+    if ((i+1)*(size_t)nThreadsPerNodes < nCPUs) {
+      threads_arg[i].nthreads                = nThreadsPerNodes;
+    } else {
+      threads_arg[i].nthreads                = (nCPUs - i*nThreadsPerNodes);
+    }
+    if (pthread_create (&threads[i],  NULL, numa_node_ptr,  (void*) &threads_arg[i]) != 0) {
+      fputs("Fail to create NUMA master node thread.\n", stderr);
+      exit(1);
+    }
+  }
+  
+  /* Wait for master nodes */
+  pthread_mutex_lock(&NodeMutex);
+  if (NodeCounter > 0) pthread_cond_wait(&NodeCond, &NodeMutex);
+  pthread_mutex_unlock(&NodeMutex);
+
+  gettimeofday(&_t1,0);
+  const double t = (double) (_t1.tv_sec - _t0.tv_sec) + (double) (_t1.tv_usec - _t0.tv_usec) * 0.000001;
+
+  nHeuristicPassed = Shares[0];
+  for (size_t i=1; i<nNodes; ++i) nHeuristicPassed += Shares[i];
+  
+  if (OutputVerbose)
+    fprintf(stderr, "Overall %lu sequences passed heuristic test in %lf [s].\n", nHeuristicPassed, t);
+  if (nHeuristicPassed == 0) goto CLEAN;
+  
+  ////////////////////////////////////////////////////////////////////////////////////////////////
+  // FILTER
+  ////////////////////////////////////////////////////////////////////////////////////////////////
+  /* Allocate master memory to hold sequences ID */
+  SeqID = _mm_malloc(nHeuristicPassed*sizeof(unsigned int), 16);
+  if (SeqID == NULL) {
+      fputs("Master unable to allocate memory\n", stderr);
+      goto CLEAN;
+  }
+  {
+    unsigned int * restrict SeqIDptr = SeqID;
+    for (size_t i=0; i<nNodes; ++i) {
+	memcpy(SeqIDptr, YesNoID[i], Shares[i]*sizeof(unsigned int));
+	SeqIDptr += Shares[i];
+    }
+    
+    /* Share according to overall number of cores */  
+    size_t CoreShare = nHeuristicPassed / nCPUs;
+    CoreShare += (nHeuristicPassed % nCPUs) > (nCPUs-1) ? 1 : 0;
+    Shares[0] = 0;
+    for (size_t i=1; i<nCPUs; ++i) {
+      Shares[i] = i*CoreShare;
+      if (OutputVerbose)
+        fprintf(stderr,"NodeShares %lu starts at %lu and stops at %lu\n", i, Shares[i-1], Shares[i]);
+    }
+    Shares[nCPUs] = nHeuristicPassed;
+    if (OutputVerbose)
+        fprintf(stderr,"NodeShares %lu starts at %lu and stops at %lu\n", nCPUs, Shares[nCPUs-1], Shares[nCPUs]);
+    
+    SeqIDptr = SeqID;
+    const size_t datasize = nThreadsPerNodes*CoreShare;
+    for (size_t i=0; i<nNodes-1; ++i) {
+	memcpy(YesNoID[i], SeqIDptr, datasize*sizeof(unsigned int));
+	SeqIDptr += datasize;
+    if (OutputVerbose)
+	    fprintf(stderr,"Node %lu has %lu elements\n", i+1, datasize);
+    }
+    memcpy(YesNoID[nNodes-1], SeqIDptr, (nHeuristicPassed - (nNodes-1)*datasize)*sizeof(unsigned int));
+    if (OutputVerbose)
+        fprintf(stderr,"Node %lu has %lu elements\n", nNodes, (nHeuristicPassed - (nNodes-1)*datasize));
+  }
+  
+#ifdef NUMA_DEBUG
+  if (OutputVerbose)
+    fputs("Master triggering filter phase\n", stderr);
+#endif
+  gettimeofday(&_t0,0);
+  
+  pthread_mutex_lock(&MasterMutex);
+  NodeCounter = nNodes;
+  MasterDone = false;
+  pthread_cond_broadcast(&MasterCond);
+  pthread_mutex_unlock(&MasterMutex);
+  
+  /* Wait for master nodes */
+  pthread_mutex_lock(&NodeMutex);
+  if (NodeCounter > 0) pthread_cond_wait(&NodeCond, &NodeMutex);
+  pthread_mutex_unlock(&NodeMutex);
+
+  gettimeofday(&_t1,0);
+  
+  nFilterPassed = Shares[0];
+  {
+    for (size_t i=1; i<nNodes; ++i) nFilterPassed += Shares[i];
+    const double t = (double) (_t1.tv_sec - _t0.tv_sec) + (double) (_t1.tv_usec - _t0.tv_usec) * 0.000001;
+    if (OutputVerbose)
+        fprintf(stderr, "Overall %lu sequences passed filter test in %lf [s].\n",nFilterPassed, t);
+  }
+  ////////////////////////////////////////////////////////////////////////////////////////////////
+  // ALIGNMENT
+  ////////////////////////////////////////////////////////////////////////////////////////////////
+  {
+    unsigned int * restrict SeqIDptr = SeqID;
+    for (size_t i=0; i<nNodes; ++i) {
+	memcpy(SeqIDptr, YesNoID[i], Shares[i]*sizeof(unsigned int));
+	SeqIDptr += Shares[i];
+    }
+    
+    /* Share according to overall number of cores */  
+    size_t CoreShare = nFilterPassed / nCPUs;
+    CoreShare += (nFilterPassed % nCPUs) > (nCPUs-1) ? 1 : 0;
+    Shares[0] = 0;
+    for (size_t i=1; i<nCPUs; ++i) {
+      Shares[i] = i*CoreShare;
+      if (OutputVerbose)
+        fprintf(stderr,"NodeShares %lu starts at %lu and stops at %lu\n", i, Shares[i-1], Shares[i]);
+    }
+    Shares[nCPUs] = nFilterPassed;
+    if (OutputVerbose)
+        fprintf(stderr,"NodeShares %lu starts at %lu and stops at %lu\n", nCPUs, Shares[nCPUs-1], Shares[nCPUs]);
+    
+    SeqIDptr = SeqID;
+    const size_t datasize = nThreadsPerNodes*CoreShare;
+    for (size_t i=0; i<nNodes-1; ++i) {
+	memcpy(YesNoID[i], SeqIDptr, datasize*sizeof(unsigned int));
+	SeqIDptr += datasize;
+    if (OutputVerbose)
+	    fprintf(stderr,"Node %lu has %lu elements\n", i+1, datasize);
+    }
+    memcpy(YesNoID[nNodes-1], SeqIDptr, (nFilterPassed - (nNodes-1)*datasize)*sizeof(unsigned int));
+    if (OutputVerbose)
+        fprintf(stderr,"Node %lu has %lu elements\n", nNodes, (nFilterPassed - (nNodes-1)*datasize));
+  }
+  
+#ifdef NUMA_DEBUG
+  if (OutputVerbose)
+    fputs("Master triggering alignment phase\n", stderr);
+#endif
+  gettimeofday(&_t0,0);
+  
+  pthread_mutex_lock(&MasterMutex);
+  NodeCounter = nNodes;
+  MasterDone = true;
+  pthread_cond_broadcast(&MasterCond);
+  pthread_mutex_unlock(&MasterMutex);
+  
+  /* Wait for master nodes */
+  pthread_mutex_lock(&NodeMutex);
+  if (NodeCounter > 0) pthread_cond_wait(&NodeCond, &NodeMutex);
+  pthread_mutex_unlock(&NodeMutex);
+
+  gettimeofday(&_t1,0);
+  {
+    size_t nAlignPassed = Shares[0];
+    for (size_t i=1; i<nNodes; ++i) nFilterPassed += Shares[i];
+    const double t = (double) (_t1.tv_sec - _t0.tv_sec) + (double) (_t1.tv_usec - _t0.tv_usec) * 0.000001;
+    if (OutputVerbose)
+        fprintf(stderr, "Overall %lu sequences passed alignment in %lf [s].\n",nFilterPassed, t);
+  }
+  
+CLEAN:
+  /* Destroy mutexes and condition variables */
+  pthread_mutex_destroy(&NodeMutex);
+  pthread_cond_destroy(&NodeCond);
+  pthread_mutex_destroy(&MasterMutex);
+  pthread_cond_destroy(&MasterCond);
+  
+  for (size_t i=0; i<nNodes; ++i) {
+    numa_free(YesNoID[i], MaxNodeShare*sizeof(unsigned int));
+  }
+  
+  } 
+#endif
+  /* Free Memory */
+END:
+  FreeProfile(&prf);
+  FreeFASTAStructure(&FASTA);
+  freeSystemInfo(&System);
+
+  exit(0);
+}
diff --git a/src/C/prg/testHeuristic.c b/src/C/prg/testHeuristic.c
new file mode 100644
index 0000000..7170d48
--- /dev/null
+++ b/src/C/prg/testHeuristic.c
@@ -0,0 +1,366 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include <mm_malloc.h>
+#include <sys/time.h>
+#include <pthread.h>
+#include <alloca.h>
+#include "profile.h"
+#include "sequence.h"
+
+#ifdef BOTH
+#undef USE_TRANSPOSE
+#endif
+
+extern unsigned int heuristic(const struct Profile * const restrict prf, const PFSequence * const restrict Sequence);
+extern unsigned int TransposeHeuristic(const int * const restrict TransposeMatch, const size_t Alphabet_Length,
+                                const size_t Profile_Length, const PFSequence * const restrict Sequence);
+#ifdef SMP
+struct ThreadData {
+  struct Profile * prf;
+  int * TransposeMatch;
+  FASTAStructure * FASTA;
+  char * SequenceFileName;
+#ifdef BOTH
+  unsigned int (*Scores)[2];
+#else 
+  unsigned int * Scores;
+#endif
+  size_t start;
+  size_t stop;
+  size_t counter; 
+};
+
+static void *thread_fctA( void * _Data)
+{
+  Sequence SeqData;
+  struct timeval _t0, _t1;
+  const struct Profile * const restrict prf   = ((struct ThreadData*) _Data)->prf;
+  const FASTAStructure * const restrict FASTA = ((struct ThreadData*) _Data)->FASTA;
+#ifdef BOTH
+  unsigned int (* const restrict Scores)[2]   = ((struct ThreadData*) _Data)->Scores;
+#else
+  unsigned int * const restrict Scores        = ((struct ThreadData*) _Data)->Scores;
+#endif
+  int * const restrict TransposeMatch         = ((struct ThreadData*) _Data)->TransposeMatch;
+  PFSequence * PFSeq;
+
+  /* Timing */
+  gettimeofday(&_t0,0);
+
+  /* Allocate memory to hold sequence */
+  SeqData.Memory = malloc(FASTA->MaxSequenceSize*sizeof(unsigned char));
+  if (SeqData.Memory == NULL) {
+    fputs("Thread Cannot allocate memory for sequence.\n", stderr);
+    return (void*) 1;
+  }
+  /* Allocate work aligned memory for xali1 */
+  int * Work = _mm_malloc((1+prf->Length)*4*sizeof(int)+63,64);
+
+  /* Open sequence file*/
+  FILE* inSequence = fopen(((struct ThreadData*) _Data)->SequenceFileName, "r");
+
+  size_t Counter = 0;
+  size_t Start   = ((struct ThreadData*) _Data)->start;
+  size_t Stop   = ((struct ThreadData*) _Data)->stop;
+
+
+  /* LOOPS ON SEQUENCES */
+   for (size_t i=Start; i<Stop; ++i) {
+    PFSeq = ReadSequenceIndex(&SeqData, i, inSequence, FASTA->DataPtr);
+
+    /* Translate first sequence */
+    PFSeq = TranslateCharToIndex(PFSeq, prf->Alphabet_Mapping);
+#ifdef BOTH
+    Scores[i][0] = heuristic(prf, PFSeq);
+#else
+    Scores[i] = heuristic(prf, PFSeq);
+#endif
+  }
+
+  /* close sequence file */
+  fclose(inSequence);
+
+  /* Free Memory */
+  free(SeqData.Memory);
+  _mm_free(Work);
+
+  /* Timing */
+  gettimeofday(&_t1,0);
+
+  const double t = (double) (_t1.tv_sec - _t0.tv_sec) + (double) (_t1.tv_usec - _t0.tv_usec) * 0.000001;
+//   printf("This thread got %lu sequences passing test and ran it in %lf [s]\n", Counter, t);
+  ((struct ThreadData*) _Data)->counter = Counter;
+  return 0;
+}
+
+static void *thread_fctB( void * _Data)
+{
+  Sequence SeqData;
+  struct timeval _t0, _t1;
+  const struct Profile * const restrict prf   = ((struct ThreadData*) _Data)->prf;
+  const FASTAStructure * const restrict FASTA = ((struct ThreadData*) _Data)->FASTA;
+#ifdef BOTH
+  unsigned int (* const restrict Scores)[2]   = ((struct ThreadData*) _Data)->Scores;
+#else 
+  unsigned int * const restrict Scores        = ((struct ThreadData*) _Data)->Scores;
+#endif
+  int * const restrict TransposeMatch         = ((struct ThreadData*) _Data)->TransposeMatch;
+  PFSequence * PFSeq;
+
+  /* Timing */
+  gettimeofday(&_t0,0);
+
+  /* Allocate memory to hold sequence */
+  SeqData.Memory = malloc(FASTA->MaxSequenceSize*sizeof(unsigned char));
+  if (SeqData.Memory == NULL) {
+    fputs("Thread Cannot allocate memory for sequence.\n", stderr);
+    return (void*) 1;
+  }
+  /* Allocate work aligned memory for xali1 */
+  int * Work = _mm_malloc((1+prf->Length)*4*sizeof(int)+63,64);
+
+  /* Open sequence file*/
+  FILE* inSequence = fopen(((struct ThreadData*) _Data)->SequenceFileName, "r");
+
+  size_t Counter = 0;
+  size_t Start   = ((struct ThreadData*) _Data)->start;
+  size_t Stop   = ((struct ThreadData*) _Data)->stop;
+
+
+  /* LOOPS ON SEQUENCES */
+   for (size_t i=Start; i<Stop; ++i) {
+    PFSeq = ReadSequenceIndex(&SeqData, i, inSequence, FASTA->DataPtr);
+
+    /* Translate first sequence */
+    PFSeq = TranslateCharToIndex(PFSeq, prf->Alphabet_Mapping);
+
+#ifdef BOTH
+    Scores[i][1] = TransposeHeuristic(TransposeMatch, prf->Alphabet_Length,
+                                      prf->Length, PFSeq);
+#else
+    Scores[i]    = TransposeHeuristic(TransposeMatch, prf->Alphabet_Length,
+                                      prf->Length, PFSeq);
+#endif
+  }
+
+  /* close sequence file */
+  fclose(inSequence);
+
+  /* Free Memory */
+  free(SeqData.Memory);
+  _mm_free(Work);
+
+  /* Timing */
+  gettimeofday(&_t1,0);
+
+  const double t = (double) (_t1.tv_sec - _t0.tv_sec) + (double) (_t1.tv_usec - _t0.tv_usec) * 0.000001;
+//   printf("This thread got %lu sequences passing test and ran it in %lf [s]\n", Counter, t);
+  ((struct ThreadData*) _Data)->counter = Counter;
+  return 0;
+}
+#endif
+
+int main (int argc, char *argv[])
+{
+  struct Profile prf;
+  FASTAStructure FASTA;
+  Sequence SeqData;
+  PFSequence * PFSeq;
+  struct timeval _t0, _t1;
+  int res;
+  unsigned int Score;
+
+  if (argc < 3) { fputs("provide profile and FASTA file\n", stderr); return 1;}
+
+/* Read the profile and output some infos */
+  res = ReadProfile(argv[1], &prf);
+  if (res != 0) {
+    fputs("Error found.\n", stderr);
+    return 1;
+  }
+//   printf("Profile %s has length %lu and alphabet size of %lu\nCutoff value is set to %i\n",
+//          argv[1], prf.Length, prf.Alphabet_Length, prf.CutOffData.ICUT[0]);
+// 
+//   puts("Alphabet Mapping");
+//   for (size_t i=0; i<ALPHABET_SIZE; ++i) {
+//     printf("Map %c=%2u\t", (char) ((unsigned char) 'A' + (unsigned char) i), (unsigned int) prf.Alphabet_Mapping[i]);
+//     if ((i+1) % 8 == 0 ) puts("");
+//   }
+//   puts("\n");
+
+
+  /* Read the FASTA file */
+  res = AnalyzeFASTAStructure(argv[2], &FASTA);
+  if (res != 0) {
+    fputs("Error found.\n", stderr);
+    return 1;
+  }
+
+//   printf("FASTA file %s analyzed\n\tFound %lu sequences within %lu bytes\n\tBiggest sequence entry is %lu bytes\n",
+//           argv[1], FASTA.SequenceCount, FASTA.FileSize, FASTA.MaxSequenceSize);
+
+  // Transpose Match Matrix for second heuristic
+  gettimeofday(&_t0,0);
+  const int * TIMatch = TransposeAndConvertMatchMatrix(&(prf.Scores.Match), prf.Alphabet_Length, prf.Length);
+  gettimeofday(&_t1,0);
+  double t = (double) (_t1.tv_sec - _t0.tv_sec) + (double) (_t1.tv_usec - _t0.tv_usec) * 0.000001;
+  fprintf(stderr,"Transposing Match matrix took %lf seconds.\n", t);
+#ifdef BOTH  
+  unsigned int (* restrict const Scores)[2] = (unsigned int (*)[2])  _mm_malloc(2*FASTA.SequenceCount*sizeof(unsigned int), 64);
+#else
+  unsigned int * restrict const Scores = (unsigned int *)  _mm_malloc(FASTA.SequenceCount*sizeof(unsigned int), 64);
+#endif
+  
+#ifndef SMP
+  /* Allocate memory to hold sequence */
+  SeqData.Memory = malloc(FASTA.MaxSequenceSize*sizeof(unsigned char));
+  if (SeqData.Memory == NULL) {
+    fputs("Cannot allocate menmory for sequence.\n", stderr);
+    return 1;
+  }
+
+  /* Open sequence file*/
+  FILE* inSequence = fopen(argv[2], "r");
+
+  size_t counter = 0;
+  gettimeofday(&_t0,0);
+  /* LOOPS ON SEQUENCES */
+   for (size_t i=0; i<FASTA.SequenceCount; ++i) {
+    PFSeq = ReadSequenceIndex(&SeqData, i, inSequence, FASTA.DataPtr);
+//     if (i == 15147) printf("%s\n%lu\n%s\n",SeqData.Header, FASTA.DataPtr[15147].HeaderLength , PFSeq->ProfileIndex);
+
+    /* Translate first sequence */
+    PFSeq = TranslateCharToIndex(PFSeq, prf.Alphabet_Mapping);
+
+    Scores[i] = heuristic(&prf, PFSeq);
+  }
+  gettimeofday(&_t1,0);
+  t = (double) (_t1.tv_sec - _t0.tv_sec) + (double) (_t1.tv_usec - _t0.tv_usec) * 0.000001;
+//   printf("Heuristic took %lf [s].\n%lu sequences satisfy alignment test.\n", t, counter);
+
+/* close sequence file */
+  fclose(inSequence);
+
+  /* Free Memory */
+  free(SeqData.Memory);
+
+  FreeProfile(&prf);
+#else
+  /* Retrieve number of cores */
+  const size_t nCPUs = argc == 4 ? atoi(argv[3]) : (size_t) sysconf(_SC_NPROCESSORS_CONF);
+
+//   const size_t share = FASTA.SequenceCount/nCPUs;
+
+  // Share according to file size
+  size_t * shares = alloca(nCPUs*sizeof(size_t));
+  {
+    const size_t FileShare = (size_t) FASTA.FileSize / nCPUs;
+    const Data * DataPtr = FASTA.DataPtr;
+    size_t counter = 0;
+    shares[0] = 0;
+    for (size_t i=1; i<nCPUs; ++i) {
+      register size_t tmp = i*FileShare;
+      while ( (size_t) DataPtr->Offset < tmp) { ++DataPtr; ++counter; }
+      shares[i] = counter;
+//       printf("share %i stops at %li\n", i, counter);
+    }
+  }
+
+  struct ThreadData *threads_arg = alloca(nCPUs*sizeof(struct ThreadData));
+  pthread_t *threads = (pthread_t*) alloca(nCPUs*sizeof(pthread_t));
+
+  /* Inner loop on profile */
+  
+  gettimeofday(&_t0,0);
+
+  for (size_t i=0; i<nCPUs-1; ++i) {
+    threads_arg[i].prf   = &prf;
+    threads_arg[i].TransposeMatch = TIMatch;
+    threads_arg[i].FASTA = &FASTA;
+    threads_arg[i].SequenceFileName = argv[2];
+    threads_arg[i].Scores = Scores;
+//     threads_arg[i].start = i*share;
+//     threads_arg[i].stop  = (i+1)*share;
+    threads_arg[i].start = shares[i];
+    threads_arg[i].stop  = shares[i+1];
+#ifndef USE_TRANSPOSE    
+    if (pthread_create (&threads[i],  NULL, thread_fctA,  (void*) &threads_arg[i]) != 0) {
+      return 1;
+    }
+#else
+    if (pthread_create (&threads[i],  NULL, thread_fctB,  (void*) &threads_arg[i]) != 0) {
+      return 1;
+    }
+#endif
+  }
+  threads_arg[nCPUs-1].prf   = &prf;
+  threads_arg[nCPUs-1].TransposeMatch = TIMatch;
+  threads_arg[nCPUs-1].FASTA = &FASTA;
+  threads_arg[nCPUs-1].SequenceFileName = argv[2];
+  threads_arg[nCPUs-1].Scores = Scores;
+//   threads_arg[nCPUs-1].start = (nCPUs-1)*share;
+  threads_arg[nCPUs-1].start = shares[nCPUs-1];
+  threads_arg[nCPUs-1].stop  = FASTA.SequenceCount;
+  
+#ifndef USE_TRANSPOSE
+  if (pthread_create (&threads[nCPUs-1],  NULL, thread_fctA,  (void*) &threads_arg[nCPUs-1]) != 0) {
+      return 1;
+    }
+#else
+  if (pthread_create (&threads[nCPUs-1],  NULL, thread_fctB,  (void*) &threads_arg[nCPUs-1]) != 0) {
+      return 1;
+    }
+#endif
+
+  for (size_t i=0; i<nCPUs; i++) {
+    pthread_join(threads[i], NULL);
+  }
+
+  gettimeofday(&_t1,0);
+  t = (double) (_t1.tv_sec - _t0.tv_sec) + (double) (_t1.tv_usec - _t0.tv_usec) * 0.000001;
+#ifndef USE_TRANSPOSE 
+  fprintf(stderr,"heuristic took %lf seconds to treat on %li cores.\n", t, nCPUs);
+#else
+  fprintf(stderr,"Transpose heuristic took %lf seconds to treat on %li cores.\n", t, nCPUs);
+#endif
+  /* Inner loop on sequence */
+#ifdef BOTH  
+  gettimeofday(&_t0,0);
+
+  for (size_t i=0; i<nCPUs; ++i) {
+    if (pthread_create (&threads[i],  NULL, thread_fctB,  (void*) &threads_arg[i]) != 0) {
+      return 1;
+    }
+  }
+
+  for (size_t i=0; i<nCPUs; i++) {
+    pthread_join(threads[i], NULL);
+  }
+
+  gettimeofday(&_t1,0);
+  t = (double) (_t1.tv_sec - _t0.tv_sec) + (double) (_t1.tv_usec - _t0.tv_usec) * 0.000001;
+  fprintf(stderr,"Transpose heuristic took %lf seconds to treat on %li cores.\n", t, nCPUs);
+#endif
+  
+  /* Open sequence file*/
+  FILE* inSequence = fopen(argv[2], "r");
+  char Buffer[256] __attribute__((aligned(16)));
+  for (size_t i=0; i<FASTA.SequenceCount; ++i) {
+    ReadSequenceNameIndex(Buffer, i, inSequence, FASTA.DataPtr);
+#ifdef BOTH
+    printf("%s\t%u\t%u\n", Buffer, Scores[i][0], Scores[i][1]);
+#else
+    printf("%s\t%u\n", Buffer, Scores[i]);
+#endif
+  }
+  fclose(inSequence);
+  
+  
+
+  /* Free Memory */
+  FreeProfile(&prf);
+  _mm_free(Scores);
+    
+#endif
+  return 0;
+}
diff --git a/src/C/prg/testHeuristicMatchDeletion.c b/src/C/prg/testHeuristicMatchDeletion.c
new file mode 100644
index 0000000..bf1c796
--- /dev/null
+++ b/src/C/prg/testHeuristicMatchDeletion.c
@@ -0,0 +1,67 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include "profile.h"
+
+int main(int argc, char *argv[])
+{
+  char LINE[256];
+  char *cptr;
+  const char cMDDM[] = "MDDM ";
+  const char cMIIM[] = "MIIM ";
+  struct Profile prf;
+
+  if (argc < 1) return 1;
+  
+  ReadProfile(argv[1], &prf);
+  struct SMatch Match = prf.Scores.Match;
+
+  const size_t prfLength = prf.Length + 1;
+  const short int * Matches = Match.Alphabet;
+  const size_t AlignedStep  = Match.AlignStep;  
+  const TransitionScores * restrict InsertionLine = prf.Scores.Insertion.Transitions;
+
+  printf("Match matrix with alignment %lu\n\n",Match.AlignStep );
+  printf("    | ");
+  for (size_t alpha=0; alpha<prf.Alphabet_Length; ++alpha) {
+    printf("%4lu ", alpha);
+  }
+  fputs("\n", stdout);
+  
+  printf("    | ");
+  for (size_t alpha=0; alpha<prf.Alphabet_Length; ++alpha) {
+    fputs("-----",stdout);
+  }
+  fputs("\n", stdout);
+
+  for (size_t iprf=0; iprf<prf.Length; ++iprf) {
+    const short int MDDM = InsertionLine[iprf].From[MATCH].To[DELETION]+InsertionLine[iprf+1].From[DELETION].To[MATCH];
+    const short int MIIM = InsertionLine[iprf].From[MATCH].To[INSERTION]+InsertionLine[iprf+1].From[INSERTION].To[MATCH];
+    short int Minimum;
+    const char * STR;
+    if (MIIM < MDDM) {
+      Minimum = MDDM; 
+      STR = cMDDM;
+    } else {
+      Minimum = MIIM;
+      STR = cMIIM;
+    }
+    const short int * MatchLine = &Matches[iprf*AlignedStep];
+    memset(LINE, 0, 256*sizeof(char));
+    cptr = LINE + strlen(LINE);
+    printf("%3lu | ", iprf+1);
+    for (size_t alpha=0; alpha<prf.Alphabet_Length; ++alpha) {
+      if (MatchLine[alpha] < Minimum) {
+	fputs(STR, stdout);
+	sprintf(cptr, "%i,%i ", MatchLine[alpha], Minimum);
+	cptr = LINE + strlen(LINE);
+      } else if (MatchLine[alpha] == NLOW) {
+        printf("NLOW ");
+      } else {
+        printf("%4i ", MatchLine[alpha]);
+      }
+    }
+    printf("\t%s\n", LINE);
+  }
+  FreeProfile(&prf);
+  return 0;
+}
\ No newline at end of file
diff --git a/src/C/prg/testXali1.c b/src/C/prg/testXali1.c
new file mode 100644
index 0000000..61fb936
--- /dev/null
+++ b/src/C/prg/testXali1.c
@@ -0,0 +1,681 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include <mm_malloc.h>
+#include <sys/time.h>
+#include <pthread.h>
+#include <alloca.h>
+#include <inttypes.h>
+#ifdef __NUMA__
+#include <numa.h>
+#endif
+#include "profile.h"
+#include "sequence.h"
+#define NALI 1000
+
+static int (*xali1_ptr)(const struct Profile * const restrict, const unsigned char * const restrict,
+			int * const, const size_t, const size_t, const int, const _Bool);
+
+static void* (*thread_heuristic_ptr)(void*);
+static void* (*thread_heuristic_cutoff_ptr)(void*);
+
+#ifdef SMP
+typedef union TransposeMatrix {const int * i; const float * f;} TransposeMatrix;
+
+struct ThreadData {
+  struct Profile * prf;
+  FASTAStructure * FASTA;
+  char * SequenceFileName;
+  char * Sequences;
+  union {
+   unsigned int * ToDoID;
+   int          * SignedScores;
+   unsigned int * UnsignedScores;
+   };
+  TransposeMatrix TransposeMatch;
+  FILE ** TempOutputFile;
+  size_t start;
+  size_t stop;
+  size_t counter;
+#ifdef __NUMA__
+  size_t CoreId;
+  size_t NodeId;
+#endif
+};
+
+static void *thread_heuristic_cutoff_sse41(void * _Data) 
+{
+  Sequence SeqData;
+  const struct Profile * const restrict prf   = ((struct ThreadData*) _Data)->prf;
+  const FASTAStructure * const restrict FASTA = ((struct ThreadData*) _Data)->FASTA;
+  const int * const restrict TransposeMatch   = ((struct ThreadData*) _Data)->TransposeMatch.i;
+  unsigned int * const restrict Scores        = ((struct ThreadData*) _Data)->UnsignedScores;
+  PFSequence * PFSeq;
+
+  /* Allocate memory to hold sequence */
+  SeqData.Memory = malloc(FASTA->MaxSequenceSize*sizeof(unsigned char));
+  if (SeqData.Memory == NULL) {
+    fputs("Thread Cannot allocate memory for sequence.\n", stderr);
+    return (void*) 1;
+  }
+  /* Allocate work aligned memory for xali1 */
+  int * Work = _mm_malloc((1+prf->Length)*4*sizeof(int)+63,64);
+
+  /* Open sequence file*/
+  FILE* inSequence = fopen(((struct ThreadData*) _Data)->SequenceFileName, "r");
+
+  size_t Start              = ((struct ThreadData*) _Data)->start;
+  size_t Stop               = ((struct ThreadData*) _Data)->stop;
+  const unsigned int CutOff = prf->HeuristicCutOff;
+
+  /* LOOPS ON SEQUENCES */
+   for (size_t i=Start; i<Stop; ++i) {
+    PFSeq = ReadSequenceIndex(&SeqData, i, inSequence, FASTA->DataPtr);
+
+    /* Translate first sequence */
+    PFSeq = TranslateCharToIndex(PFSeq, prf->Alphabet_Mapping);
+
+    Scores[i] = heuristic(prf, PFSeq, CutOff);                              
+  }
+
+  /* close sequence file */
+  fclose(inSequence);
+
+  /* Free Memory */
+  free(SeqData.Memory);
+  _mm_free(Work);
+  
+  return 0;
+};
+
+static void *thread_heuristic_sse41(void * _Data) 
+{
+  Sequence SeqData;
+  const struct Profile * const restrict prf   = ((struct ThreadData*) _Data)->prf;
+  const FASTAStructure * const restrict FASTA = ((struct ThreadData*) _Data)->FASTA;
+  const int * const restrict TransposeMatch   = ((struct ThreadData*) _Data)->TransposeMatch.i;
+  unsigned int * const restrict Scores        = ((struct ThreadData*) _Data)->UnsignedScores;
+  PFSequence * PFSeq;
+
+  /* Allocate memory to hold sequence */
+  SeqData.Memory = malloc(FASTA->MaxSequenceSize*sizeof(unsigned char));
+  if (SeqData.Memory == NULL) {
+    fputs("Thread Cannot allocate memory for sequence.\n", stderr);
+    return (void*) 1;
+  }
+  /* Allocate work aligned memory for xali1 */
+  int * Work = _mm_malloc((1+prf->Length)*4*sizeof(int)+63,64);
+  if (Work == NULL) return (void*) 1;
+
+  /* Open sequence file*/
+  FILE* inSequence = fopen(((struct ThreadData*) _Data)->SequenceFileName, "r");
+
+  size_t Start              = ((struct ThreadData*) _Data)->start;
+  size_t Stop               = ((struct ThreadData*) _Data)->stop;
+  //const unsigned int CutOff = prf->HeuristicCutOff;
+
+   //fprintf(stderr,"Thread %lu - %lu\n", Start, Stop);
+  /* LOOPS ON SEQUENCES */
+   for (size_t i=Start; i<Stop; ++i) {
+    PFSeq = ReadSequenceIndex(&SeqData, i, inSequence, FASTA->DataPtr);
+
+    /* Translate first sequence */
+    PFSeq = TranslateCharToIndex(PFSeq, prf->Alphabet_Mapping);
+
+    Scores[i] = TransposeHeuristic_sse41(TransposeMatch, prf->Alphabet_Length, prf->Length, PFSeq);                            
+  }
+
+  /* close sequence file */
+  fclose(inSequence);
+
+  /* Free Memory */
+  free(SeqData.Memory);
+  _mm_free(Work);
+
+  return 0;
+};
+
+static void *thread_heuristic_sse2(void * _Data) 
+{
+  Sequence SeqData;
+  const struct Profile * const restrict prf   = ((struct ThreadData*) _Data)->prf;
+  const FASTAStructure * const restrict FASTA = ((struct ThreadData*) _Data)->FASTA;
+  const float * const restrict TransposeMatch = ((struct ThreadData*) _Data)->TransposeMatch.f;
+  unsigned int * const restrict Scores        = ((struct ThreadData*) _Data)->UnsignedScores;
+  PFSequence * PFSeq;
+
+  /* Allocate memory to hold sequence */
+  SeqData.Memory = malloc(FASTA->MaxSequenceSize*sizeof(unsigned char));
+  if (SeqData.Memory == NULL) {
+    fputs("Thread Cannot allocate memory for sequence.\n", stderr);
+    return (void*) 1;
+  }
+  /* Allocate work aligned memory for xali1 */
+  int * Work = _mm_malloc((1+prf->Length)*4*sizeof(int)+63,64);
+  if (Work == NULL) return (void*) 1;
+
+  /* Open sequence file*/
+  FILE* inSequence = fopen(((struct ThreadData*) _Data)->SequenceFileName, "r");
+
+  size_t Start              = ((struct ThreadData*) _Data)->start;
+  size_t Stop               = ((struct ThreadData*) _Data)->stop;
+  //const unsigned int CutOff = prf->HeuristicCutOff;
+
+  //fprintf(stderr,"Thread %lu - %lu\n", Start, Stop);
+  /* LOOPS ON SEQUENCES */
+   for (size_t i=Start; i<Stop; ++i) {
+    PFSeq = ReadSequenceIndex(&SeqData, i, inSequence, FASTA->DataPtr);
+
+    /* Translate first sequence */
+    PFSeq = TranslateCharToIndex(PFSeq, prf->Alphabet_Mapping);
+
+    Scores[i] = TransposeHeuristic_sse2(TransposeMatch, prf->Alphabet_Length, prf->Length, PFSeq);                            
+  }
+
+  /* close sequence file */
+  fclose(inSequence);
+
+  /* Free Memory */
+  free(SeqData.Memory);
+  _mm_free(Work);
+
+  return 0;
+};
+
+static void *thread_xali1( void * _Data)
+{
+  Sequence SeqData;
+  const struct Profile * const restrict prf   = ((struct ThreadData*) _Data)->prf;
+  const FASTAStructure * const restrict FASTA = ((struct ThreadData*) _Data)->FASTA;
+  int * const restrict Scores                 = ((struct ThreadData*) _Data)->SignedScores;
+  PFSequence * PFSeq;
+  
+  const int CutOff = prf->CutOffData.ICUT[0];
+
+  /* Allocate memory to hold sequence */
+  SeqData.Memory = malloc(FASTA->MaxSequenceSize*sizeof(unsigned char));
+  if (SeqData.Memory == NULL) {
+    fputs("Thread Cannot allocate memory for sequence.\n", stderr);
+    return (void*) 1;
+  }
+  /* Allocate work aligned memory for xali1 */
+  int * Work = _mm_malloc((1+prf->Length)*4*sizeof(int)+63,64);
+  if (Work == NULL) return (void*) 1;
+  
+  /* Open sequence file*/
+  FILE* inSequence = fopen(((struct ThreadData*) _Data)->SequenceFileName, "r");
+
+  size_t Start   = ((struct ThreadData*) _Data)->start;
+  size_t Stop   = ((struct ThreadData*) _Data)->stop;
+
+  /* LOOPS ON SEQUENCES */
+   for (size_t i=Start; i<Stop; ++i) {
+    PFSeq = ReadSequenceIndex(&SeqData, Scores[i], inSequence, FASTA->DataPtr);
+
+    /* Translate first sequence */
+    PFSeq = TranslateCharToIndex(PFSeq, prf->Alphabet_Mapping);
+
+    Scores[i] = xali1_ptr(prf, PFSeq->ProfileIndex, Work, 0, PFSeq->Length, CutOff, false);
+  }
+
+  /* close sequence file */
+  fclose(inSequence);
+
+  /* Free Memory */
+  free(SeqData.Memory);
+  _mm_free(Work);
+  
+  return 0;
+}
+
+static void *thread_xaliPT( void * _Data)
+{
+  Sequence SeqData;
+  const struct Profile * const restrict prf   = ((struct ThreadData*) _Data)->prf;
+  const FASTAStructure * const restrict FASTA = ((struct ThreadData*) _Data)->FASTA; 
+  const unsigned int * const restrict SeqID   = ((struct ThreadData*) _Data)->ToDoID;
+  char * restrict Sequences                   = ((struct ThreadData*) _Data)->Sequences;
+  PFSequence * PFSeq;
+
+  /* Allocate memory to hold sequence */
+  SeqData.Memory = malloc(FASTA->MaxSequenceSize*sizeof(unsigned char));
+  if (SeqData.Memory == NULL) {
+    fputs("Thread cannot allocate memory for sequence.\n", stderr);
+    return (void*) 1;
+  }
+  /* Allocate work aligned memory for xali1 */
+
+  union lScores * const restrict iop   = _mm_malloc((1+prf->Length)*sizeof(union lScores), 16);
+  union Positions * const restrict iom = _mm_malloc((1+prf->Length)*sizeof(union Positions), 16);
+  union Positions * const restrict ioi = _mm_malloc((1+prf->Length)*sizeof(union Positions), 16);
+  struct Alignment * const restrict alignment = _mm_malloc(NALI*sizeof(struct Alignment),16);
+  _Bool * const restrict Lock = _mm_malloc(FASTA->MaxSequenceSize*sizeof(_Bool), 16);
+  if ( iop == NULL || iom == NULL || ioi == NULL || alignment == NULL || Lock == NULL) return (void*) 1;
+
+  /* Open sequence file */
+  FILE* inSequence = fopen(((struct ThreadData*) _Data)->SequenceFileName, "r");
+
+  /* Open temporary output file */
+  //FILE* outSequence = 
+
+  size_t Start   = ((struct ThreadData*) _Data)->start;
+  size_t Stop   = ((struct ThreadData*) _Data)->stop;
+  //fprintf(stderr,"Thread %lu - %lu\n", Start, Stop);
+  /* LOOPS ON SEQUENCES */
+   for (size_t i=Start; i<Stop; ++i) {
+    PFSeq = ReadSequenceIndex(&SeqData, (size_t) SeqID[i], inSequence, FASTA->DataPtr);
+  
+    /* Translate first sequence */
+    PFSeq = TranslateCharToIndex(PFSeq, prf->Alphabet_Mapping);
+
+    /* Clear Lock */
+    memset(Lock, 0, FASTA->MaxSequenceSize*sizeof(_Bool));
+    
+    // It seems we must have sequence starting from 1 here
+    const int nali = xalip_sse41(prf, PFSeq->ProfileIndex, iop, iom, ioi, 1, PFSeq->Length, alignment,
+                           Lock, prf->DisjointData.NDIP[0], prf->DisjointData.NDIP[1], false, 
+                           prf->CutOffData.ICUT[0], NALI); 
+                           
+    if (nali < 0) exit(1);          
+    
+    int IPM[2];
+    // Alignement is not filled from start !!!
+    for ( int j=1; j<=nali; j++) {
+    
+      /* Remove lock for aligned sequence generation */
+      memset(Lock, 0, FASTA->MaxSequenceSize*sizeof(_Bool));
+      memset(&Sequences[i*(prf->Length+1)*3], 0, 3*(1+prf->Length)*sizeof(char));
+      
+       if (xalit_sse41(prf, prf->DisjointData.NDIP[0], prf->DisjointData.NDIP[1], 1, PFSeq->Length, &(PFSeq->ProfileIndex[0]),
+                 &Sequences[i*(prf->Length+1)*3], iop, &alignment[j], Lock, IPM) < 0 ) exit(1);
+       fprintf(stdout, "%s  %i %i\n%s\n", SeqData.Header, alignment[j].JALS, j, &Sequences[i*(prf->Length+1)*3 + 1]);           
+    }
+  }
+
+  /* close sequence file */
+  fclose(inSequence);
+
+  /* Free Memory */
+  free(SeqData.Memory);
+  _mm_free(iop);
+  _mm_free(iom);
+  _mm_free(ioi);
+  _mm_free(alignment);
+  _mm_free(Lock); 
+
+  return 0;
+}
+
+
+#endif
+
+int main (int argc, char *argv[])
+{
+  struct Profile prf;
+  FASTAStructure FASTA;
+  Sequence SeqData;
+  PFSequence * PFSeq;
+  struct timeval _t0, _t1;
+  int res, Score;
+  int SSE41 = 0;
+
+  if (argc < 4) { fputs("provide profile and FASTA file and heuristic cutoff\n", stderr); return 1;}
+#ifdef __NUMA__
+  if (numa_available() < 0) {
+    fputs("NUMA architecture NOT available on this system.\n", stderr);
+  } else {
+    fputs("NUMA architecture available.\n", stderr);
+  }
+#endif
+  const char * const SSE = getenv("SSE");
+  if (SSE == NULL) {
+    fputs("SSE 4.1 will be used\n" ,stderr);
+    xali1_ptr = xali1_sse41;
+    thread_heuristic_cutoff_ptr = thread_heuristic_cutoff_sse41;
+    thread_heuristic_ptr = thread_heuristic_sse41;
+  } else {
+    if (strncmp(SSE,"SSE2",5) == 0) {
+      xali1_ptr = xali1_sse2;
+//       thread_heuristic_cutoff_ptr = thread_heuristic_cutoff_sse41;
+      thread_heuristic_ptr = thread_heuristic_sse2;
+      fputs("SSE 2 will be used\n" ,stderr);
+      SSE41 = 1;
+    } else {
+      fputs("SSE 4.1 will be used\n" ,stderr);
+      xali1_ptr = xali1_sse41;
+      thread_heuristic_cutoff_ptr = thread_heuristic_cutoff_sse41;
+      thread_heuristic_ptr = thread_heuristic_sse41;
+    }
+  }
+  
+  /* Read the profile and output some infos */
+  gettimeofday(&_t0,0);
+  res = ReadProfile(argv[1], &prf);
+  gettimeofday(&_t1,0);
+  double T = (double) (_t1.tv_sec - _t0.tv_sec) + (double) (_t1.tv_usec - _t0.tv_usec) * 0.000001;
+  fprintf(stderr, "Profile reading took %lf seconds.\n", T);
+  
+  if (res != 0) {
+    fputs("Error found.\n", stderr);
+    return 1;
+  }
+  printf("Profile %s has length %lu and alphabet size of %lu\nCutoff value is set to %i\n",
+         argv[1], prf.Length, prf.Alphabet_Length, prf.CutOffData.ICUT[0]);
+
+  puts("Alphabet Mapping");
+  for (size_t i=0; i<ALPHABET_SIZE; ++i) {
+    printf("Map %c=%2u\t", (char) ((unsigned char) 'A' + (unsigned char) i), (unsigned int) prf.Alphabet_Mapping[i]);
+    if ((i+1) % 8 == 0 ) puts("");
+  }
+  puts("\n");
+
+  /* Read the FASTA file */
+  gettimeofday(&_t0,0);
+  res = AnalyzeFASTAStructure(argv[2], &FASTA);
+  gettimeofday(&_t1,0);
+  T = (double) (_t1.tv_sec - _t0.tv_sec) + (double) (_t1.tv_usec - _t0.tv_usec) * 0.000001;
+  fprintf(stderr, "Sequence file indexing took %lf seconds.\n", T);
+  if (res != 0) {
+    fputs("Error found.\n", stderr);
+    return 1;
+  }
+  
+  printf("FASTA file %s analyzed\n\tFound %lu sequences within %lu bytes\n\tBiggest sequence entry is %lu bytes\n",
+          argv[1], FASTA.SequenceCount, FASTA.FileSize, FASTA.MaxSequenceSize);
+
+#ifndef SMP
+  /* Allocate memory to hold sequence */
+  SeqData.Memory = malloc(FASTA.MaxSequenceSize*sizeof(unsigned char));
+  if (SeqData.Memory == NULL) {
+    fputs("Cannot allocate menmory for sequence.\n", stderr);
+    return 1;
+  }
+  /* Allocate work aligned memory for xali1 */
+  int * Work = _mm_malloc((1+prf.Length)*4*sizeof(int)+63,64);
+  
+  /* Allocate true/false memory for xalip */
+  _Bool * YesNo = _mm_malloc(FASTA.SequenceCount*sizeof(_Bool), 64);
+  
+  /* Open sequence file*/
+  FILE* inSequence = fopen(argv[2], "r");
+
+  size_t counter = 0;
+  gettimeofday(&_t0,0);
+  /* LOOPS ON SEQUENCES */
+   for (size_t i=0; i<FASTA.SequenceCount; ++i) {
+    if ( (PFSeq = ReadSequenceIndex(&SeqData, i, inSequence, FASTA.DataPtr) ) == NULL ) {
+	fprintf(stderr, "Error reading sequence %lu from database.\n", i);
+	exit(1);
+    }
+
+    /* Translate first sequence */
+    PFSeq = TranslateCharToIndex(PFSeq, prf.Alphabet_Mapping);
+
+    Score = xali1_sse41(&prf, PFSeq->ProfileIndex, Work, 0, PFSeq->Length, prf.CutOffData.ICUT[0], false);
+    if (Score >= prf.CutOffData.ICUT[0]) ++counter;
+    YesNo[i] = Score >= prf.CutOffData.ICUT[0] ? true : false;
+  }
+  gettimeofday(&_t1,0);
+  const double t = (double) (_t1.tv_sec - _t0.tv_sec) + (double) (_t1.tv_usec - _t0.tv_usec) * 0.000001;
+  fprintf(stderr,"XALI1 took %lf [s].\n%lu sequences satisfy alignment test.\n", t, counter);
+  
+  // Allocate memory for xalip */
+  union lScores * const restrict iop   = _mm_malloc((1+prf.Length)*sizeof(union lScores), 16);
+  union Positions * const restrict iom = _mm_malloc((1+prf.Length)*sizeof(union Positions), 16);
+  union Positions * const restrict ioi = _mm_malloc((1+prf.Length)*sizeof(union Positions), 16);
+  struct Alignment * const restrict alignment = _mm_malloc(NALI*sizeof(struct Alignment),16);
+  _Bool * const restrict Lock = _mm_malloc(FASTA.MaxSequenceSize*sizeof(_Bool), 16);
+  char * const restrict CALI = _mm_malloc(4*(1+prf.Length)*sizeof(char),16);
+  
+  /* LOOPS ON SEQUENCES */
+  
+  gettimeofday(&_t0,0);
+  for (size_t i=0; i<FASTA.SequenceCount; ++i) {
+    if (YesNo[i] == false) continue;
+    
+    if ( (PFSeq = ReadSequenceIndex(&SeqData, i, inSequence, FASTA.DataPtr)) == NULL) {
+	fprintf(stderr, "Error reading sequence %lu from database.\n" , i);
+	exit(1);
+    }
+
+    /* Translate first sequence */
+    PFSeq = TranslateCharToIndex(PFSeq, prf.Alphabet_Mapping);
+    
+    /* Clear Lock */
+    memset(Lock, 0, FASTA.MaxSequenceSize*sizeof(_Bool));
+    
+    // It seems we must have sequence starting from 1 here
+    const int nali = xalip_sse41(&prf, &(PFSeq->ProfileIndex[0]), iop, iom, ioi, 1, PFSeq->Length, alignment,
+                           Lock, prf.DisjointData.NDIP[0], prf.DisjointData.NDIP[1], false, 
+                           prf.CutOffData.ICUT[0], NALI); 
+                           
+    if (nali < 0) exit(1);          
+    
+    //fprintf(stderr, "%i alignments found\n", nali);
+    int IPM[2];
+    // Alignement is not filled from start !!!
+    for ( int j=1; j<=nali; j++) {
+    
+      /* Remove lock for aligned sequence generation */
+      memset(Lock, 0, FASTA.MaxSequenceSize*sizeof(_Bool));
+      memset(CALI, 0, 4*(1+prf.Length)*sizeof(char));
+      
+       if (xalit_sse41(&prf, prf.DisjointData.NDIP[0], prf.DisjointData.NDIP[1], 1, PFSeq->Length, &(PFSeq->ProfileIndex[0]),
+                 CALI, iop, &alignment[j], Lock, IPM) < 0 ) exit(1);
+                  
+       fprintf(stdout,"Sequence %lu %i: %s\n", i,j, &CALI[1]);
+    }
+  }
+  gettimeofday(&_t1,0);
+  T = (double) (_t1.tv_sec - _t0.tv_sec) + (double) (_t1.tv_usec - _t0.tv_usec) * 0.000001;
+  fprintf(stderr,"XALIP took %lf [s].\n", T);
+  
+  /* close sequence file */
+  fclose(inSequence);
+
+  /* Free Memory */
+  free(SeqData.Memory);
+  _mm_free(Work);
+  _mm_free(YesNo);
+  _mm_free(iop);
+  _mm_free(iom);
+  _mm_free(ioi);
+  _mm_free(alignment);
+  _mm_free(Lock);
+  _mm_free(CALI);
+  FreeProfile(&prf);
+#else
+  /* Retrieve number of cores */
+  const size_t nCPUs = argc == 5 ? atoi(argv[4]) : (size_t) sysconf(_SC_NPROCESSORS_CONF);
+
+  ////////////////////////////////////////////////////////////////////////////////////////////////
+  // HEURISTIC
+  ////////////////////////////////////////////////////////////////////////////////////////////////
+
+  /* Get Heuristic cutoff from command line */
+  prf.HeuristicCutOff = atoi(argv[3]);
+  printf("Heuristic cutoff set to %u\n", prf.HeuristicCutOff);
+
+  /* Compute Match Score Matrix transpose */
+  gettimeofday(&_t0,0);
+  TransposeMatrix TIMatch;
+  if (SSE41) {
+    TIMatch.f = TransposeAndConvertToFloatMatchMatrix(&(prf.Scores.Match), prf.Alphabet_Length, prf.Length);
+  } else {
+    TIMatch.i = TransposeAndConvertMatchMatrix(&(prf.Scores.Match), prf.Alphabet_Length, prf.Length);
+  }
+  gettimeofday(&_t1,0);
+  double t = (double) (_t1.tv_sec - _t0.tv_sec) + (double) (_t1.tv_usec - _t0.tv_usec) * 0.000001;
+  fprintf(stderr,"Transposing Match matrix took %lf seconds.\n", t);
+   
+  /* Share according to file size */
+  size_t * shares = alloca((nCPUs+1)*sizeof(size_t));
+  {
+    const size_t FileShare = 1 + (size_t) FASTA.FileSize / nCPUs;
+    const s_Data * DataPtr = FASTA.DataPtr;
+    size_t counter = 0;
+    shares[0] = 0;
+    for (size_t i=1; i<nCPUs; ++i) {
+      register size_t tmp = i*FileShare;
+      while ( (size_t) DataPtr->Offset < tmp) { ++DataPtr; ++counter; }
+      shares[i] = counter;
+      //printf("share %i starts at %li and stops at %li\n", i, shares[i-1], counter);
+    }
+    shares[nCPUs] = FASTA.SequenceCount;
+  }
+
+  /* Allocate memory for sequence YesNo or ID to be done */
+  unsigned int * const YesNoID = _mm_malloc( FASTA.SequenceCount*sizeof(unsigned int), 16);
+
+  /* Allocate stack memory for posix thread structures */
+  struct ThreadData *threads_arg = alloca(nCPUs*sizeof(struct ThreadData));
+  pthread_t *threads = (pthread_t*) alloca(nCPUs*sizeof(pthread_t));
+
+  /* Dispatch to threads */
+  gettimeofday(&_t0,0);
+  for (size_t i=0; i<nCPUs; ++i) {
+    threads_arg[i].prf                       = &prf;
+    threads_arg[i].FASTA                     = &FASTA;
+    threads_arg[i].UnsignedScores            = YesNoID;
+    threads_arg[i].TransposeMatch            = TIMatch;
+    threads_arg[i].SequenceFileName          = argv[2];
+    threads_arg[i].start                     = shares[i];
+    threads_arg[i].stop                      = shares[i+1];
+    if (pthread_create (&threads[i],  NULL, thread_heuristic_ptr,  (void*) &threads_arg[i]) != 0) {
+      return 1;
+    }
+  }
+
+  for (size_t i=0; i<nCPUs; i++) {
+    pthread_join(threads[i], NULL);  
+  }
+  gettimeofday(&_t1,0);
+  t = (double) (_t1.tv_sec - _t0.tv_sec) + (double) (_t1.tv_usec - _t0.tv_usec) * 0.000001;
+  
+   /* Gather the one that passed th1e heuristic */
+  unsigned int * restrict pID = YesNoID;
+  register const unsigned int lHeuristicCutOff = prf.HeuristicCutOff;
+  fprintf(stderr, "Heurstic cutoff set to %u\n", lHeuristicCutOff);
+  /*for (size_t iseq=0; iseq<FASTA.SequenceCount; ++iseq) {
+    //printf("HEURISTIC %u\t%i\n", iseq+1, YesNoID[iseq]);
+    if (YesNoID[iseq] >= lHeuristicCutOff) {
+      *pID++ = (unsigned int) iseq;
+    }
+  }
+  const size_t HeuristicCounter =  (size_t) ( (uintptr_t) pID - (uintptr_t) YesNoID)/sizeof(unsigned int); 
+  */
+  
+  size_t HeuristicCounter = 0;
+  for (size_t iseq=0; iseq<FASTA.SequenceCount; ++iseq) {
+    //printf("HEURISTIC %lu\t%i\n", iseq+1, YesNoID[iseq]);
+    if (YesNoID[iseq] >= lHeuristicCutOff) {
+      YesNoID[HeuristicCounter] = (unsigned int) iseq;
+      ++HeuristicCounter;
+    }
+  }
+  fprintf(stderr,"Overall there are %lu sequences passing heuritic. These took %lf seconds to treat on %li cores.\n",
+          HeuristicCounter, t, nCPUs);
+          
+
+  ////////////////////////////////////////////////////////////////////////////////////////////////
+  // FILTER
+  ////////////////////////////////////////////////////////////////////////////////////////////////
+  
+  /* Compute the new share for each thread */
+  {
+      const size_t SequenceShare = 1 + HeuristicCounter / nCPUs;
+      shares[0] = 0;
+      for (size_t i=1; i<nCPUs; ++i) {
+         shares[i] = i*SequenceShare;
+         //printf("share %i starts at %li and stops at %li\n", i, shares[i-1], shares[i]);
+      }
+      shares[nCPUs] = HeuristicCounter;
+  }
+  
+  /* Dispatch to threads */
+  gettimeofday(&_t0,0);
+  for (size_t i=0; i<nCPUs; ++i) {
+    threads_arg[i].start = shares[i];
+    threads_arg[i].stop  = shares[i+1];
+    if (pthread_create (&threads[i],  NULL, thread_xali1,  (void*) &threads_arg[i]) != 0) {
+      return 1;
+    }
+  }
+
+  for (size_t i=0; i<nCPUs; i++) {
+    pthread_join(threads[i], NULL);  
+  }
+
+  gettimeofday(&_t1,0);
+  t = (double) (_t1.tv_sec - _t0.tv_sec) + (double) (_t1.tv_usec - _t0.tv_usec) * 0.000001;
+  
+  /* Gather the one that passed xali1 */
+  pID = YesNoID;
+  register const int lFilterCutoff = (int) prf.CutOffData.ICUT[0];
+  fprintf(stderr, "Filter cutoff set to %u\n", lFilterCutoff); 
+  /*for (size_t iseq=0; iseq<HeuristicCounter; ++iseq) {
+    printf("FILTER %u\t%i\n", iseq+1, YesNoID[iseq]);
+    if (YesNoID[iseq] > lFilterCutoff) {
+      *pID++ = (unsigned int) iseq;
+    }
+  }
+  const size_t FilterCounter = (size_t) ( (uintptr_t) pID - (uintptr_t) YesNoID)/sizeof(unsigned int);
+   */
+  size_t FilterCounter = 0;
+  for (size_t iseq=0; iseq<HeuristicCounter; ++iseq) {
+      //printf("FILTER %lu\t%i\n", iseq+1, YesNoID[iseq]);
+      if ( *((int*) &YesNoID[iseq]) > lFilterCutoff ) {
+         YesNoID[FilterCounter] = (unsigned int) iseq;
+         ++FilterCounter;
+      }
+  }
+   
+  fprintf(stderr,"Overall there are %lu sequences passing filter. These took %lf seconds to treat on %li cores.\n",
+          FilterCounter, t, nCPUs);
+  
+  ////////////////////////////////////////////////////////////////////////////////////////////////
+  // ALIGNMENT
+  ////////////////////////////////////////////////////////////////////////////////////////////////
+  
+  /* Allocate memory for the alignment */
+  char * AlignedSequences = malloc(FilterCounter*(prf.Length+1)*3*sizeof(char));
+  if (AlignedSequences == NULL) {
+   fputs("Unable to allocate memory for resulting aligned sequences.\n", stderr);
+   exit(1);
+  }
+  
+  /* Compute the new share for each thread */
+  {
+      const size_t SequenceShare = 1 + FilterCounter / nCPUs;
+      shares[0] = 0;
+      for (size_t i=1; i<nCPUs; ++i) shares[i] = i*SequenceShare;
+      shares[nCPUs] = FilterCounter;
+  }
+ 
+  /* Dispatch to threads */
+  gettimeofday(&_t0,0); 
+  for (size_t i=0; i<nCPUs; ++i) {
+    threads_arg[i].Sequences   = AlignedSequences;
+    threads_arg[i].start       = shares[i];
+    threads_arg[i].stop        = shares[i+1];
+    if (pthread_create (&threads[i],  NULL, thread_xaliPT,  (void*) &threads_arg[i]) != 0) {
+      return 1;
+    }
+  }
+
+  for (size_t i=0; i<nCPUs; i++) {
+    pthread_join(threads[i], NULL);  
+  }
+  gettimeofday(&_t1,0);
+  t = (double) (_t1.tv_sec - _t0.tv_sec) + (double) (_t1.tv_usec - _t0.tv_usec) * 0.000001;
+  fprintf(stderr,"Overall there are %lu sequences. These took %lf seconds to align on %li cores.\n", FilterCounter, t, nCPUs);
+
+  /* Print out aligned sequences */  
+  //for (int iseq=0; iseq<(int)FilterCounter; ++iseq) printf("Sequence %7i : %s\n", iseq, &AlignedSequences[iseq*(prf.Length+1)*3+1]);
+  
+
+  /* Free Memory */
+  FreeProfile(&prf);
+
+#endif
+  return 0;
+}
diff --git a/src/C/prg/testheader.c b/src/C/prg/testheader.c
new file mode 100644
index 0000000..aa05aca
--- /dev/null
+++ b/src/C/prg/testheader.c
@@ -0,0 +1,35 @@
+#include <stdlib.h>
+#include <inttypes.h>
+#include <stdio.h>
+
+#include "profile.h"
+#define size(x,y) ((uintptr_t) &y - (uintptr_t) &x)/sizeof(unsigned char)
+
+int main(int argc, char *argv[])
+{
+  struct Profile prf __attribute__((aligned(16)));
+
+  printf("Profile address: 0x%16.16x\n", &prf);
+  printf("Identification : 0x%16.16x\t%lu\n", &prf.Identification, size(prf.Identification, prf.AC_Number));
+  printf("AC_NUMBER      : 0x%16.16x\t%lu\n", &prf.AC_Number, size(prf.AC_Number ,prf.Date));
+  printf("Date           : 0x%16.16x\t%lu\n", &prf.Date, size(prf.Date, prf.Description));
+  printf("Description    : 0x%16.16x\t%lu\n", &prf.Description, size(prf.Description, prf.Alphabet_Mapping));
+  printf("Mapping alpha  : 0x%16.16x\t%lu\n", &prf.Alphabet_Mapping, size(prf.Alphabet_Mapping, prf.Length));
+  printf("Length         : 0x%16.16x\t%lu\n", &prf.Length, size(prf.Length, prf.Alphabet_Length));
+  printf("Alpha Length   : 0x%16.16x\t%lu\n", &prf.Alphabet_Length, size(prf.Alphabet_Length, prf.Insertion));
+  printf("Insertion      : 0x%16.16x\n", &prf.Insertion );
+ // printf("Aligned length : 0x%16.16x\n", &prf.Aligned_Alphabet_Length);
+  printf("Match          : 0x%16.16x\n", &prf.Match);
+  printf("isCircular     : 0x%16.16x\t%lu\n", &prf.isCircular, size(prf.isCircular, prf.NormalizationData));
+  printf("Normalization  : 0x%16.16x\t%lu\n", &prf.NormalizationData, size(prf.NormalizationData, prf.DisjointData));
+  printf("Disjoint       : 0x%16.16x\t%lu\n", &prf.DisjointData, size(prf.DisjointData, prf.CutOffData));
+  printf("Cutoff         : 0x%16.16x\n\n", &prf.CutOffData);
+
+  printf("Insertions alphabet    : 0x%16.16x\n", &prf.Insertion.Alphabet);
+  printf("Insertions boundaries  : 0x%16.16x\n", &(prf.Insertion.Boundaries));
+  printf("Insertions transitions : 0x%16.16x\n", &(prf.Insertion.Transitions));
+  printf("Insertions aligned L   : 0x%16.16x\n\n", &(prf.Insertion.AlignStep));
+  printf("Match aligned L        : 0x%16.16x\n", &(prf.Match.AlignStep) );
+  printf("Match alphabet         : 0x%16.16x\n", &(prf.Match.Alphabet) );
+  return 0;
+}
\ No newline at end of file
diff --git a/src/C/prg/threads.h b/src/C/prg/threads.h
new file mode 100644
index 0000000..0a025e5
--- /dev/null
+++ b/src/C/prg/threads.h
@@ -0,0 +1,375 @@
+/*******************************************************
+                        PFTOOLS
+ *******************************************************
+  Oct 3, 2011 threads.h
+ *******************************************************
+ (C) 2011 Swiss Institute of Bioinformatics
+     Thierry Schuepbach (thierry.schuepbach at isb-sib.ch)
+ *******************************************************/
+
+static void *thread_heuristic_sse41(void * _Data) 
+{
+  Sequence SeqData;
+  const struct Profile * const restrict prf   = ((struct ThreadData*) _Data)->prf;
+  const FASTAStructure * const restrict FASTA = ((struct ThreadData*) _Data)->FASTA;
+  const int * const restrict TransposeMatch   = ((struct ThreadData*) _Data)->TransposeMatch.i;
+  unsigned int * const restrict Scores        = &(((struct ThreadData*) _Data)->Array->UnsignedScores);
+  PFSequence * PFSeq;
+
+  /* Allocate memory to hold sequence */
+  SeqData.Data.Memory = (void*) malloc(FASTA->MaxSequenceSize*sizeof(unsigned char));
+  if (SeqData.Data.Memory == NULL) {
+    fputs("Thread Cannot allocate memory for sequence.\n", stderr);
+    return (void*) 1;
+  }
+  /* Allocate work aligned memory for xali1 */
+  int * Work = _mm_malloc((1+prf->Length)*4*sizeof(int)+63,64);
+  if (Work == NULL) return (void*) 1;
+
+  /* Open sequence file*/
+#ifndef __USE_MMAP__  
+  FILE* inSequence = fopen(((struct ThreadData*) _Data)->SequenceFileName, "r");
+#else
+  const char * const restrict SequenceFileMap = ((struct ThreadData*) _Data)->SequenceFileMap;
+#endif
+  size_t Start              = ((struct ThreadData*) _Data)->start;
+  size_t Stop               = ((struct ThreadData*) _Data)->stop;
+  //const unsigned int CutOff = prf->HeuristicCutOff;
+
+   //fprintf(stderr,"Thread %lu - %lu\n", Start, Stop);
+  /* LOOPS ON SEQUENCES */
+   for (size_t i=Start; i<Stop; ++i) {
+#ifndef __USE_MMAP__
+    PFSeq = ReadSequenceIndex(&SeqData, i, inSequence, FASTA->DataPtr);
+#else
+    PFSeq = MMAPReadSequenceIndex(&SeqData, i, SequenceFileMap, FASTA->DataPtr, 0
+#ifdef MMAP_DEBUG
+    , ((struct ThreadData*) _Data)->threadId, 0, *(((struct ThreadData*) _Data)->maplength)
+#endif
+    );
+#endif
+    /* Translate first sequence */
+    PFSeq = TranslateSequenceToIndex(PFSeq, prf->Alphabet_Mapping);
+
+    Scores[i] = TransposeHeuristic_sse41(TransposeMatch, prf->Alphabet_Length, prf->Length, PFSeq);                            
+  }
+
+  /* close sequence file */
+#ifndef __USE_MMAP__
+  fclose(inSequence);
+#endif
+  
+  /* Free Memory */
+  free(SeqData.Data.Memory);
+  _mm_free(Work);
+
+  pthread_exit(0);
+};
+
+
+static void *thread_heuristic_sse2(void * _Data) 
+{
+  Sequence SeqData;
+  const struct Profile * const restrict prf   = ((struct ThreadData*) _Data)->prf;
+  const FASTAStructure * const restrict FASTA = ((struct ThreadData*) _Data)->FASTA;
+  const float * const restrict TransposeMatch = ((struct ThreadData*) _Data)->TransposeMatch.f;
+  unsigned int * const restrict Scores        = &(((struct ThreadData*) _Data)->Array->UnsignedScores);
+  PFSequence * PFSeq;
+  
+  /* Allocate memory to hold sequence */
+  SeqData.Data.Memory = (void*) malloc(FASTA->MaxSequenceSize*sizeof(unsigned char));
+  if (SeqData.Data.Memory == NULL) {
+    fputs("Thread Cannot allocate memory for sequence.\n", stderr);
+    return (void*) 1;
+  }
+  /* Allocate work aligned memory for xali1 */
+  int * Work = (int*) _mm_malloc((1+prf->Length)*4*sizeof(int)+63,64);
+  if (Work == NULL) return (void*) 1;
+
+  /* Open sequence file*/
+#ifndef __USE_MMAP__
+  FILE* inSequence = fopen(((struct ThreadData*) _Data)->SequenceFileName, "r");
+#else
+  const char * const restrict SequenceFileMap = ((struct ThreadData*) _Data)->SequenceFileMap;
+#endif
+  
+  size_t Start              = ((struct ThreadData*) _Data)->start;
+  size_t Stop               = ((struct ThreadData*) _Data)->stop;
+  //const unsigned int CutOff = prf->HeuristicCutOff;
+
+  //fprintf(stderr,"Thread %lu - %lu\n", Start, Stop);
+  /* LOOPS ON SEQUENCES */
+   for (size_t i=Start; i<Stop; ++i) {
+#ifndef __USE_MMAP__
+    PFSeq = ReadSequenceIndex(&SeqData, i, inSequence, FASTA->DataPtr);
+#else
+    PFSeq = MMAPReadSequenceIndex(&SeqData, i, SequenceFileMap, FASTA->DataPtr, 0
+#ifdef MMAP_DEBUG
+    , ((struct ThreadData*) _Data)->threadId, 0, *(((struct ThreadData*) _Data)->maplength)
+#endif
+    );
+#endif
+    /* Translate first sequence */
+    PFSeq = TranslateSequenceToIndex(PFSeq, prf->Alphabet_Mapping);
+
+    Scores[i] = TransposeHeuristic_sse2(TransposeMatch, prf->Alphabet_Length, prf->Length, PFSeq);                            
+  }
+
+  /* close sequence file */
+#ifndef __USE_MMAP__
+  fclose(inSequence);
+#endif
+  
+  /* Free Memory */
+  free(SeqData.Data.Memory);
+  _mm_free(Work);
+ 
+  pthread_exit(0);
+};
+
+static void *thread_xali1( void * _Data)
+{
+  Sequence SeqData;
+  const struct Profile * const restrict prf   = ((struct ThreadData*) _Data)->prf;
+  const FASTAStructure * const restrict FASTA = ((struct ThreadData*) _Data)->FASTA;
+  const unsigned int * const restrict SeqID   = &(((struct ThreadData*) _Data)->Array[0].ToDoID);
+  int * const restrict Scores                 = ((struct ThreadData*) _Data)->FilterScores;
+  PFSequence * PFSeq;
+
+  /* Allocate memory to hold sequence */
+  SeqData.Data.Memory = malloc(FASTA->MaxSequenceSize*sizeof(unsigned char));
+  if (SeqData.Data.Memory == NULL) {
+    fputs("Thread Cannot allocate memory for sequence.\n", stderr);
+    return (void*) 1;
+  }
+  /* Allocate work aligned memory for xali1 */
+  int * Work = _mm_malloc((1+prf->Length)*4*sizeof(int)+63,64);
+  if (Work == NULL) return (void*) 1;
+  
+  /* Open sequence file*/
+#ifndef __USE_MMAP__
+  FILE* inSequence = fopen(((struct ThreadData*) _Data)->SequenceFileName, "r");
+#else
+  const char * const restrict SequenceFileMap = ((struct ThreadData*) _Data)->SequenceFileMap;
+#endif
+  
+  size_t Start  = ((struct ThreadData*) _Data)->start;
+  size_t Stop   = ((struct ThreadData*) _Data)->stop;
+  
+  const _Bool RealFilterScore = (((struct ThreadData*) _Data)->counter > 0 ) ? true : false;
+
+  /* Do we need to compute the cutoff */
+  if (NormalizedToRawFunction == &N2R_3) {   
+    /* LOOPS ON SEQUENCES */
+    for (size_t i=Start; i<Stop; ++i) {
+#ifndef __USE_MMAP__
+      PFSeq = ReadSequenceIndex(&SeqData, SeqID[i], inSequence, FASTA->DataPtr);
+#else
+      PFSequence * PFSeq = MMAPReadSequenceIndex(&SeqData, SeqID[i], SequenceFileMap, FASTA->DataPtr, 0
+#ifdef MMAP_DEBUG
+      , ((struct ThreadData*) _Data)->threadId, 0, *(((struct ThreadData*) _Data)->maplength)
+#endif
+      );
+#endif
+      /* Translate first sequence */
+      PFSeq = TranslateSequenceToIndex(PFSeq, prf->Alphabet_Mapping);
+      const float RAVE = ComputeAverageFrequencies(PFSeq, Average);
+      const int CutOff = NormalizedToRawFunction(prf->CutOffData.Values[prf->Level].RCUT[prf->Mode], PFSeq->Length, RAVE);
+      Scores[i] = xali1_ptr(prf, PFSeq->ProfileIndex, Work, 0, PFSeq->Length, CutOff, RealFilterScore);
+    }
+  } 
+  else {
+    const int CutOff = prf->CutOffData.Values[prf->Level].ICUT;
+    /* LOOPS ON SEQUENCES */
+    for (size_t i=Start; i<Stop; ++i) {
+#ifndef __USE_MMAP__
+      PFSeq = ReadSequenceIndex(&SeqData, SeqID[i], inSequence, FASTA->DataPtr);
+#else
+      PFSequence * PFSeq = MMAPReadSequenceIndex(&SeqData, SeqID[i], SequenceFileMap, FASTA->DataPtr, 0
+#ifdef MMAP_DEBUG
+      , ((struct ThreadData*) _Data)->threadId, 0, *(((struct ThreadData*) _Data)->maplength)
+#endif
+      );
+#endif
+      /* Translate first sequence */
+      PFSeq = TranslateSequenceToIndex(PFSeq, prf->Alphabet_Mapping);
+
+      Scores[i] = xali1_ptr(prf, PFSeq->ProfileIndex, Work, 0, PFSeq->Length, CutOff, RealFilterScore);
+    }
+  } 
+  /* close sequence file */
+#ifndef __USE_MMAP__
+  fclose(inSequence);
+#endif
+  
+  /* Free Memory */
+  free(SeqData.Data.Memory);
+  _mm_free(Work);
+  
+  pthread_exit(0);;
+}
+
+static void *thread_xaliPT( void * _Data)
+{ 
+  Sequence SeqData;
+  const struct Profile * const restrict prf   = ((struct ThreadData*) _Data)->prf;
+  const FASTAStructure * const restrict FASTA = ((struct ThreadData*) _Data)->FASTA; 
+  const unsigned int * const restrict SeqID   = &(((struct ThreadData*) _Data)->Array->ToDoID);
+  char * restrict Sequences                   = ((struct ThreadData*) _Data)->Sequences;
+  PFSequence * PFSeq;
+
+  /* Allocate memory to hold sequence */
+  SeqData.Data.Memory = (void*) malloc(FASTA->MaxSequenceSize*sizeof(unsigned char));
+  if (SeqData.Data.Memory == NULL) {
+    fputs("Thread cannot allocate memory for sequence.\n", stderr);
+    return (void*) 1;
+  }
+  /* Allocate work aligned memory for xali1 */
+
+  union lScores * const restrict iop   = _mm_malloc((1+prf->Length)*sizeof(union lScores), 16);
+  union Positions * const restrict iom = _mm_malloc((1+prf->Length)*sizeof(union Positions), 16);
+  union Positions * const restrict ioi = _mm_malloc((1+prf->Length)*sizeof(union Positions), 16);
+  struct Alignment * const restrict alignment = _mm_malloc(NALI*sizeof(struct Alignment),16);
+  _Bool * const restrict Lock = _mm_malloc(FASTA->MaxSequenceSize*sizeof(_Bool), 16);
+  if ( iop == NULL || iom == NULL || ioi == NULL || alignment == NULL || Lock == NULL) return (void*) 1;
+
+  /* Open sequence file */
+#ifndef __USE_MMAP__
+  FILE* inSequence = fopen(((struct ThreadData*) _Data)->SequenceFileName, "r");
+#else
+  const char * const restrict SequenceFileMap = ((struct ThreadData*) _Data)->SequenceFileMap;
+#endif
+
+  size_t Start = ((struct ThreadData*) _Data)->start;
+  size_t Stop  = ((struct ThreadData*) _Data)->stop;
+
+  unsigned int AlignedSeqCounter = 0;
+  // Allocate on the stack for maximum NALI alignment
+  char ** const AlignedSequences = (char **) alloca((NALI+1)*sizeof(char *));
+  
+  if (NormalizedToRawFunction != &N2R_3) {   
+    register const int CutOff = prf->CutOffData.Values[prf->Level].ICUT;
+  
+    /* LOOPS ON SEQUENCES */
+    for (size_t i=Start; i<Stop; ++i) {
+#ifndef __USE_MMAP__
+      PFSeq = ReadSequenceIndex(&SeqData, (size_t) SeqID[i], inSequence, FASTA->DataPtr);
+#else
+      PFSeq = MMAPReadSequenceIndex(&SeqData, (size_t) SeqID[i], SequenceFileMap, FASTA->DataPtr, 0
+#ifdef MMAP_DEBUG
+      , ((struct ThreadData*) _Data)->threadId, 0, *(((struct ThreadData*) _Data)->maplength)
+#endif
+      );
+#endif
+      /* Translate first sequence */
+      PFSeq = TranslateSequenceToIndex(PFSeq, prf->Alphabet_Mapping);
+
+      /* Clear Lock */
+      memset(Lock, 0, FASTA->MaxSequenceSize*sizeof(_Bool));
+      
+      // It seems we must have sequence starting from 1 here
+      const int nali = xalip_ptr(prf, PFSeq->ProfileIndex, iop, iom, ioi, 1, PFSeq->Length, alignment,
+			         Lock, prf->DisjointData.NDIP[0], prf->DisjointData.NDIP[1], false, 
+			         CutOff, NALI); 
+			    
+      if (nali <= 0) {
+	fprintf(stderr,"Thread %lu : Internal error xalip reported no possible alignment for sequence %lu(%u) (nali=%i)!\n%s\n",
+		((struct ThreadData*) _Data)->threadId, i, SeqID[i], nali, SeqData.Data.Header);
+	exit(1);          
+      }
+      
+      // Clear memory to hold sequences, NOT NEEDED in fact
+      //memset(&Sequences, 0, nali*3*(1+prf->Length)*sizeof(char));
+      
+      // Alignement is not filled from start !!!
+      for ( int j=1; j<=nali; j++) {
+      
+	/* Remove lock for aligned sequence generation */
+	memset(Lock, 0, FASTA->MaxSequenceSize*sizeof(_Bool));
+	
+	if (xalit_ptr(prf, prf->DisjointData.NDIP[0], prf->DisjointData.NDIP[1], 1, PFSeq->Length, &(PFSeq->ProfileIndex[0]),
+		      &Sequences[j*(prf->Length+1)*3], iop, &alignment[j], Lock) < 0 ) {
+	  fputs("Internal error within xalit!\n", stderr);
+	  exit(1);
+	}
+	AlignedSequences[j-1] = &Sequences[j*(prf->Length+1)*3 + 1];
+	++AlignedSeqCounter;
+      }
+      pthread_mutex_lock(&PrintLock);
+      PrintFunction(prf, (const char ** const) AlignedSequences, &alignment[1], SeqData.Data.Header, PFSeq->Length, 0.0f, nali);
+      pthread_mutex_unlock(&PrintLock);
+    }
+  } 
+  else {
+    /* LOOPS ON SEQUENCES */
+    for (size_t i=Start; i<Stop; ++i) {
+#ifndef __USE_MMAP__
+      PFSeq = ReadSequenceIndex(&SeqData, (size_t) SeqID[i], inSequence, FASTA->DataPtr);
+#else
+      PFSeq = MMAPReadSequenceIndex(&SeqData, (size_t) SeqID[i], SequenceFileMap, FASTA->DataPtr, 0
+#ifdef MMAP_DEBUG
+      , ((struct ThreadData*) _Data)->threadId, 0, *(((struct ThreadData*) _Data)->maplength)
+#endif
+      );
+#endif
+      /* Translate first sequence */
+      PFSeq = TranslateSequenceToIndex(PFSeq, prf->Alphabet_Mapping);
+      
+      const float RAVE = ComputeAverageFrequencies(PFSeq, Average);
+      const int CutOff = NormalizedToRawFunction(prf->CutOffData.Values[prf->Level].RCUT[prf->Mode], PFSeq->Length, RAVE);
+
+      /* Clear Lock */
+      memset(Lock, 0, FASTA->MaxSequenceSize*sizeof(_Bool));
+      
+      // It seems we must have sequence starting from 1 here
+      const int nali = xalip_ptr(prf, PFSeq->ProfileIndex, iop, iom, ioi, 1, PFSeq->Length, alignment,
+			    Lock, prf->DisjointData.NDIP[0], prf->DisjointData.NDIP[1], false, 
+			    CutOff, NALI); 
+			    
+      if (nali <= 0) {
+	fprintf(stderr,"Thread %lu : Internal error xalip reported no possible alignment for sequence %lu(%u) (nali=%i)!\n%s\n",
+		((struct ThreadData*) _Data)->threadId, i, SeqID[i], nali, SeqData.Data.Header);
+	exit(1);          
+      }
+
+      // Clear memory to hold sequences, NOT NEEDED in fact
+      //memset(&Sequences, 0, nali*3*(1+prf->Length)*sizeof(char));
+
+      // Alignement is not filled from start !!!
+      for ( int j=1; j<=nali; j++) {
+      
+	/* Remove lock for aligned sequence generation */
+	memset(Lock, 0, FASTA->MaxSequenceSize*sizeof(_Bool));
+	
+  //        fprintf(stdout,"%s\n", SeqData.Data.Header); fflush(stdout);
+	if (xalit_ptr(prf, prf->DisjointData.NDIP[0], prf->DisjointData.NDIP[1], 1, PFSeq->Length, &(PFSeq->ProfileIndex[0]),
+		      &Sequences[j*(prf->Length+1)*3], iop, &alignment[j], Lock) < 0 ) {
+	  fputs("Internal error within xalit!\n", stderr);
+	  exit(1);
+	}
+	AlignedSequences[j-1] = &Sequences[j*(prf->Length+1)*3 + 1];
+	++AlignedSeqCounter;
+      }
+      pthread_mutex_lock(&PrintLock);
+      PrintFunction(prf, (const char ** const) AlignedSequences, &alignment[1], SeqData.Data.Header, PFSeq->Length, RAVE, nali);
+      pthread_mutex_unlock(&PrintLock);
+    }
+  }
+
+  /* Set the number of aligned sequences */
+  ((struct ThreadData*) _Data)->counter = AlignedSeqCounter; 
+
+  /* close sequence file */
+#ifndef __USE_MMAP__
+  fclose(inSequence);
+#endif
+  /* Free Memory */
+  free(SeqData.Data.Memory);
+  _mm_free(iop);
+  _mm_free(iom);
+  _mm_free(ioi);
+  _mm_free(alignment);
+  _mm_free(Lock); 
+
+  pthread_exit(0);;
+}
diff --git a/src/C/sse2/heuristic_sse2.c b/src/C/sse2/heuristic_sse2.c
new file mode 100644
index 0000000..b4eaf12
--- /dev/null
+++ b/src/C/sse2/heuristic_sse2.c
@@ -0,0 +1,395 @@
+/*******************************************************
+                        PFTOOLS
+ *******************************************************
+  Dec 1, 2011 heuristic.c
+ *******************************************************
+ (C) 2011 Swiss Institute of Bioinformatics
+     Thierry Schuepbach (thierry.schuepbach at isb-sib.ch)
+ *******************************************************/
+#include <stdlib.h>
+#include <inttypes.h>
+#include <emmintrin.h>
+#include <alloca.h>
+#include "profile.h"
+
+unsigned int TransposeHeuristic_sse2(const float * const restrict TransposeMatch, const size_t Alphabet_Length,
+				     const size_t Profile_Length, const PFSequence * const restrict Sequence)
+{
+  size_t iprf;
+  // Allocate vectors on the stack ( one for read, one for write )
+  const size_t Aligned_Profile_Length = (Profile_Length+1 + 15) & ~15;
+  
+  float * restrict v0 = (float *) (( (uintptr_t) alloca(3*Aligned_Profile_Length*sizeof(float) + 63)) & ~63);
+  float * restrict v1 = v0 + Aligned_Profile_Length;
+  float * restrict Sc = v0 + 2*Aligned_Profile_Length;
+  
+//   float * restrict v0 = (float *) ( ( (uintptr_t) alloca(Aligned_Profile_Length*sizeof(float) + 63)) & ~63);
+//   float * restrict v1 = (float *) ( ( (uintptr_t) alloca(Aligned_Profile_Length*sizeof(float) + 63)) & ~63);
+//   float * restrict Sc = (float *) ( ( (uintptr_t) alloca(Aligned_Profile_Length*sizeof(float) + 63)) & ~63);
+  
+  register float * restrict v_w = v0;
+
+  // Initialize v with first sequence
+  register size_t Index = (size_t) Sequence->ProfileIndex[0];
+  register const float * restrict lMatch = &TransposeMatch[Aligned_Profile_Length*Index];
+  
+  iprf = 0;
+  register __m128 __Zero1, __Zero2, __Zero3, __Zero4;
+//    __asm__ __volatile__ ( 
+// 	  "xorps %0, %0;"
+// 	  "xorps %1, %1;"
+// 	  "xorps %2, %2;"
+// 	  "xorps %3, %3;"
+// 	  : "=x"(__Zero1) , "=x"(__Zero2), "=x"(__Zero3), "=x"(__Zero4) 
+//     );
+  do {
+    __m128 __sc1, __sc2, __sc3, __sc4;
+    __m128 __m1, __m2, __m3, __m4;
+    
+    __m1  = _mm_load_ps(&lMatch[iprf]);
+    __m2  = _mm_load_ps(&lMatch[iprf+4]);
+    __m3  = _mm_load_ps(&lMatch[iprf+8]);
+    __m4  = _mm_load_ps(&lMatch[iprf+12]);
+    
+    __asm__ __volatile__ ("xorps %0, %0;" : "=x"(__Zero1) );
+    __asm__ __volatile__ ("movaps %1, %0; maxps %2, %0;" : "=x"(__sc1) : "x"(__m1), "x"(__Zero1));
+    __asm__ __volatile__ ("movaps %1, %0; maxps %2, %0;" : "=x"(__sc2) : "x"(__m2), "x"(__Zero1));
+    __asm__ __volatile__ ("movaps %1, %0; maxps %2, %0;" : "=x"(__sc3) : "x"(__m3), "x"(__Zero1));
+    __asm__ __volatile__ ("movaps %1, %0; maxps %2, %0;" : "=x"(__sc4) : "x"(__m4), "x"(__Zero1));
+    
+//     __sc1 = _mm_max_ps(__Zero1, __m1);
+//     __sc2 = _mm_max_ps(__Zero1, __m2);
+//     __sc3 = _mm_max_ps(__Zero1, __m3);
+//     __sc4 = _mm_max_ps(__Zero1, __m4);
+    
+//     __Zero1 = _mm_max_ps(__Zero1, __m1);
+//     __Zero2 = _mm_max_ps(__Zero2, __m2);
+//     __Zero3 = _mm_max_ps(__Zero3, __m3);
+//     __Zero4 = _mm_max_ps(__Zero4, __m4);
+     
+    _mm_store_ps(&v_w[iprf   ], __m1);
+    _mm_store_ps(&v_w[iprf+4 ], __m2);
+    _mm_store_ps(&v_w[iprf+8 ], __m3);
+    _mm_store_ps(&v_w[iprf+12], __m4);
+    
+    _mm_store_ps(&Sc[iprf   ], __sc1);
+    _mm_store_ps(&Sc[iprf+4 ], __sc2);
+    _mm_store_ps(&Sc[iprf+8 ], __sc3);
+    _mm_store_ps(&Sc[iprf+12], __sc4);
+    
+//     _mm_store_ps(&Sc[iprf   ], __Zero1);
+//     _mm_store_ps(&Sc[iprf+4 ], __Zero2);
+//     _mm_store_ps(&Sc[iprf+8 ], __Zero3);
+//     _mm_store_ps(&Sc[iprf+12], __Zero4);
+//     
+//      __asm__ __volatile__ ( 
+// 	  "xorps %0, %0;"
+// 	  "xorps %1, %1;"
+// 	  "xorps %2, %2;"
+// 	  "xorps %3, %3;"
+// 	  : "=x"(__Zero1) , "=x"(__Zero2), "=x"(__Zero3), "=x"(__Zero4) 
+//     );
+     
+    iprf += 16;
+  } while (iprf < Profile_Length);
+  
+  // Set read v pointer
+  register const float * v_r = v0;
+  v_w = v1;
+
+  // Run through the rest of the profile
+  for (unsigned int iseq=1; iseq<(unsigned int) Sequence->Length; ++iseq) {
+    Index = (size_t) Sequence->ProfileIndex[iseq];
+    lMatch = &TransposeMatch[Aligned_Profile_Length*Index];
+//     for (iprf=Profile_Length; iprf<Aligned_Profile_Length; ++iprf) fprintf(stderr,"%2u %lu %lf %lf\n", iseq, iprf, lMatch[iprf], Sc[iprf]);
+#if 0
+    v_w[0] = lMatch[0] > 0.0f ? lMatch[0] : 0.0f;
+    if (lMatch[0] > Sc[0] ) Sc[0] = lMatch[0];
+    
+    for (iprf=1; iprf<Profile_Length; ++iprf) {
+      float tmp   = v_r[iprf-1] + lMatch[iprf];
+      tmp = tmp > 0.0f ? tmp : 0.0f;
+      v_w[iprf] = tmp;
+
+      if (tmp > Sc[iprf]) Sc[iprf] = tmp;
+    }
+#else    
+    __m128 __V_R_0 = _mm_load_ps(&v_r[0]);
+    __V_R_0        = (__m128) _mm_slli_si128((__m128i) __V_R_0, 4); 
+
+    iprf=0;
+    goto Insert;
+    
+    Loop:
+      __V_R_0        = _mm_loadu_ps(&v_r[iprf-1     ]);
+      
+    Insert:
+    ;
+      __m128 __V_R_1 = _mm_loadu_ps(&v_r[iprf-1 +  4]);
+      __m128 __V_R_2 = _mm_loadu_ps(&v_r[iprf-1 +  8]);
+      __m128 __V_R_3 = _mm_loadu_ps(&v_r[iprf-1 + 12]);
+      
+//       __asm__ __volatile__ ( "xorps %0, %0;" : "=x"(__Zero1) );
+//       __asm__ __volatile__ ( "xorps %0, %0;" : "=x"(__Zero2) );
+//       __asm__ __volatile__ ( "xorps %0, %0;" : "=x"(__Zero3) );
+//       __asm__ __volatile__ ( "xorps %0, %0;" : "=x"(__Zero4) );
+      
+      __V_R_0        = _mm_add_ps(__V_R_0, *((__m128*)&lMatch[iprf   ])); 
+      __V_R_1        = _mm_add_ps(__V_R_1, *((__m128*)&lMatch[iprf+ 4]));
+      __V_R_2        = _mm_add_ps(__V_R_2, *((__m128*)&lMatch[iprf+ 8]));
+      __V_R_3        = _mm_add_ps(__V_R_3, *((__m128*)&lMatch[iprf+12]));
+       
+//       __V_R_0        = _mm_max_ps( __Zero1, __V_R_0);
+//       __V_R_1        = _mm_max_ps( __Zero1, __V_R_1);
+//       __V_R_2        = _mm_max_ps( __Zero1, __V_R_2);
+//       __V_R_3        = _mm_max_ps( __Zero1, __V_R_3);
+      __asm__ __volatile__ ( "xorps %0, %0;" : "=x"(__Zero1) );
+      __asm__ __volatile__ ("maxps %2, %0;" : "=x"(__V_R_0) : "0"(__V_R_0), "x"(__Zero1) );
+//       __asm__ __volatile__ ( "xorps %0, %0;" : "=x"(__Zero2) );
+      __asm__ __volatile__ ("maxps %2, %0;" : "=x"(__V_R_1) : "0"(__V_R_1), "x"(__Zero1) );
+//       __asm__ __volatile__ ( "xorps %0, %0;" : "=x"(__Zero3) );
+      __asm__ __volatile__ ("maxps %2, %0;" : "=x"(__V_R_2) : "0"(__V_R_2), "x"(__Zero1) );
+//       __asm__ __volatile__ ( "xorps %0, %0;" : "=x"(__Zero4) );
+      __asm__ __volatile__ ("maxps %2, %0;" : "=x"(__V_R_3) : "0"(__V_R_3), "x"(__Zero1) );
+      
+//       __V_R_0        = _mm_max_ps( __Zero1, __V_R_0);
+//       __V_R_1        = _mm_max_ps( __Zero2, __V_R_1);
+//       __V_R_2        = _mm_max_ps( __Zero3, __V_R_2);
+//       __V_R_3        = _mm_max_ps( __Zero4, __V_R_3);
+      
+      _mm_store_ps(&v_w[iprf   ], __V_R_0);
+      _mm_store_ps(&v_w[iprf+4 ], __V_R_1);
+      _mm_store_ps(&v_w[iprf+8 ], __V_R_2);
+      _mm_store_ps(&v_w[iprf+12], __V_R_3);
+      
+//       __m128 __SC_0  = _mm_load_ps(&Sc[iprf   ]);
+//       __m128 __SC_1  = _mm_load_ps(&Sc[iprf+ 4]);
+//       __m128 __SC_2  = _mm_load_ps(&Sc[iprf+ 8]);
+//       __m128 __SC_3  = _mm_load_ps(&Sc[iprf+12]);
+//       
+//       __SC_0 = _mm_max_ps(__SC_0, __V_R_0);
+//       __SC_1 = _mm_max_ps(__SC_1, __V_R_1);
+//       __SC_2 = _mm_max_ps(__SC_2, __V_R_2);
+//       __SC_3 = _mm_max_ps(__SC_3, __V_R_3);
+//       
+//       _mm_store_ps(&Sc[iprf   ], __SC_0);
+//       _mm_store_ps(&Sc[iprf+4 ], __SC_1);
+//       _mm_store_ps(&Sc[iprf+8 ], __SC_2);
+//       _mm_store_ps(&Sc[iprf+12], __SC_3);
+      
+      __asm__ __volatile__ (
+	    "maxps   (%8,%9,4), %0;"
+	    "maxps 16(%8,%9,4), %1;"
+	    "maxps 32(%8,%9,4), %2;"
+	    "maxps 48(%8,%9,4), %3;"
+	    : "=x"(__V_R_0), "=x"(__V_R_1), "=x"(__V_R_2), "=x"(__V_R_3)
+	    : "0"(__V_R_0), "1"(__V_R_1), "2"(__V_R_2), "3"(__V_R_3), "r"(Sc), "r"(iprf)
+      );
+      
+      _mm_store_ps(&Sc[iprf   ], __V_R_0);
+      _mm_store_ps(&Sc[iprf+4 ], __V_R_1);
+      _mm_store_ps(&Sc[iprf+8 ], __V_R_2);
+      _mm_store_ps(&Sc[iprf+12], __V_R_3);
+      
+
+      iprf += 16;
+    
+      if ( iprf<Profile_Length) goto Loop;
+      
+#endif
+    
+    // Swap pointers
+    const float * ptr = v_w;
+    v_w = (float*) v_r;
+    v_r = ptr;
+  }
+#if 1
+  unsigned int Score;
+  {
+    register __m128 __Sum, __Sum1, __Sum2, __Sum3; 
+    __asm__ __volatile__ ("xorps %0, %0;"
+			  "xorps %1, %1;"
+			  "xorps %2, %2;"
+			  "xorps %3, %3;"
+			  : "=x"(__Sum) , "=x"(__Sum1), "=x"(__Sum2), "=x"(__Sum3) );
+    iprf = 0;
+    do  {
+      __Sum  = _mm_add_ps(__Sum,  *((__m128*) &Sc[iprf]));
+      __Sum1 = _mm_add_ps(__Sum1, *((__m128*) &Sc[iprf+4]));
+      __Sum2 = _mm_add_ps(__Sum2, *((__m128*) &Sc[iprf+8]));
+      __Sum3 = _mm_add_ps(__Sum3, *((__m128*) &Sc[iprf+12]));
+      iprf+=16;
+    } while (iprf < (Profile_Length & ~0xF));
+    
+//     while ( iprf + 4 < Profile_Length & ~0x7) {
+//       __Sum  = _mm_add_ps(__Sum,  *((__m128*) &Sc[iprf]));
+//       iprf  += 4;
+//     }
+      
+    __Sum  = _mm_add_ps(__Sum,  __Sum1);
+    __Sum2 = _mm_add_ps(__Sum2, __Sum3);
+    __Sum  = _mm_add_ps(__Sum,  __Sum2);
+           
+    __asm__ __volatile__ (
+	      "movaps    %1, %2   ;" 
+	      "movhlps   %1, %2   ;" 
+	      "addps     %2, %1   ;" 
+	      "movaps    %1, %3   ;" 
+	      "shufps    $245, %1, %3 ;"
+	      "addss     %3, %0 ;"
+	      : "=x"(__Sum)
+	      : "0"(__Sum), "x"(__Sum2), "x"(__Sum3)
+	    );
+    
+    while ( iprf < Profile_Length ) {
+      __asm__ __volatile__ ("addss (%1,%2,4), %0;" : "=x"(__Sum) : "r"(Sc), "r"(iprf) );
+      ++iprf;
+    }
+    
+    Score = (unsigned int) _mm_cvttss_si32(__Sum);
+  }
+  return Score;
+#else
+  float fScore = 0.0f;
+  for (iprf=0; iprf<Profile_Length; ++iprf) fScore += Sc[iprf];
+  return (unsigned int) fScore;
+#endif
+  
+}
+
+unsigned int TransposeHeuristicGivenMemory_sse2(const float * const restrict TransposeMatch, float * const Memory,
+					        const size_t Alphabet_Length, const size_t Profile_Length,
+						const PFSequence * const restrict Sequence)
+{
+  size_t iprf;
+  float Score = 0.0f;
+  
+  const size_t Aligned_Profile_Length = (Profile_Length+1 + 15) & ~15;
+  float * restrict v0 = Memory;
+  float * restrict v1 = Memory + Aligned_Profile_Length;
+  float * restrict Sc = Memory + 2*Aligned_Profile_Length;
+  
+  register float * restrict v_w = v0;
+
+  // Initialize v with first sequence
+  register size_t Index = (size_t) Sequence->ProfileIndex[0];
+  register const float * restrict lMatch = &TransposeMatch[Aligned_Profile_Length*Index];
+  
+  const register __m128 __Zero = _mm_setzero_ps();
+  iprf = 0;
+  do {
+    __m128 __m1  = _mm_load_ps(&lMatch[iprf]);
+    __m128 __m2  = _mm_load_ps(&lMatch[iprf+4]);
+    __m128 __m3  = _mm_load_ps(&lMatch[iprf+8]);
+    __m128 __m4  = _mm_load_ps(&lMatch[iprf+12]);
+    __m128 __sc1 = _mm_max_ps(__Zero, __m1);
+    _mm_store_ps(&v_w[iprf], __m1);
+    __m128 __sc2 = _mm_max_ps(__Zero, __m2);
+    _mm_store_ps(&v_w[iprf+4], __m1);
+    __m128 __sc3 = _mm_max_ps(__Zero, __m3);
+    _mm_store_ps(&v_w[iprf+8], __m1);
+    __m128 __sc4 = _mm_max_ps(__Zero, __m4);
+    _mm_store_ps(&v_w[iprf+12], __m1);
+    _mm_store_ps(&Sc[iprf   ], __sc1);
+    _mm_store_ps(&Sc[iprf+4 ], __sc2);
+    _mm_store_ps(&Sc[iprf+8 ], __sc3);
+    _mm_store_ps(&Sc[iprf+12], __sc4);
+    iprf += 16;
+  } while (iprf < Profile_Length);
+ 
+
+  // Set read v pointer
+  register const float * v_r = v0;
+  v_w = v1;
+
+  // Run through the rest of the profile
+  for (unsigned int iseq=1; iseq<(unsigned int) Sequence->Length; ++iseq) {
+    Index = (size_t) Sequence->ProfileIndex[iseq];
+    lMatch = &TransposeMatch[Aligned_Profile_Length*Index];
+#if 0
+    v_w[0] = lMatch[0] > 0.0f ? lMatch[0] : 0.0f;
+    if (lMatch[0] > Sc[0] ) Sc[0] = lMatch[0];
+   
+    __assume_aligned(lMatch, 16);
+    __assume_aligned(v_r, 16);
+    __assume_aligned(v_w, 16);
+    __assume_aligned(Sc, 16);
+ 
+    for (iprf=1; iprf<Profile_Length; ++iprf) {
+      float tmp   = v_r[iprf-1] + lMatch[iprf];
+      tmp = tmp > 0.0f ? tmp : 0.0f;
+      v_w[iprf] = tmp;
+
+      if (tmp > Sc[iprf]) Sc[iprf] = tmp;
+    }
+#else
+    
+    __m128 __V_R_0 = _mm_load_ps(&v_r[0]);
+    __V_R_0        = (__m128) _mm_slli_si128((__m128i) __V_R_0, 4); 
+
+    iprf=0;
+    goto Insert;
+    
+    Loop:
+      __V_R_0                  = _mm_loadu_ps(&v_r[iprf-1]);
+      
+    Insert:
+    ;
+      __V_R_0        = _mm_add_ps(__V_R_0, *((__m128*)&lMatch[iprf])); 
+      
+      __m128 __V_R_1 = _mm_loadu_ps(&v_r[iprf-1 + 4]);
+      __V_R_1        = _mm_add_ps(__V_R_1, *((__m128*)&lMatch[iprf+4]));
+      _mm_store_ps(&v_w[iprf   ], __V_R_0);
+      
+      __m128 __V_R_2 = _mm_loadu_ps(&v_r[iprf-1 + 8]);
+      __V_R_2        = _mm_add_ps(__V_R_2, *((__m128*)&lMatch[iprf+8])); 
+       _mm_store_ps(&v_w[iprf+4 ], __V_R_1);
+       
+      __m128 __V_R_3 = _mm_loadu_ps(&v_r[iprf-1 + 12]);
+      __V_R_3        = _mm_add_ps(__V_R_3, *((__m128*)&lMatch[iprf+12]));
+      _mm_store_ps(&v_w[iprf+8 ], __V_R_2);
+      
+      __m128 __SC_0  = _mm_load_ps(&Sc[iprf]);
+      __V_R_0        = _mm_max_ps( __Zero, __V_R_0);
+      _mm_store_ps(&v_w[iprf+12], __V_R_3);
+      
+      
+      __m128 __SC_1  = _mm_load_ps(&Sc[iprf + 4]);
+      __V_R_1        = _mm_max_ps( __Zero, __V_R_1);
+      __SC_0         = _mm_max_ps(__SC_0, __V_R_0);
+      _mm_store_ps(&Sc[iprf   ], __SC_0);
+      
+      __m128 __SC_2  = _mm_load_ps(&Sc[iprf + 8]);
+      __V_R_2        = _mm_max_ps( __Zero, __V_R_2);
+       __SC_1        = _mm_max_ps(__SC_1, __V_R_1);
+       _mm_store_ps(&Sc[iprf+4 ], __SC_1);
+       
+      __m128 __SC_3  = _mm_load_ps(&Sc[iprf + 12]);
+      __V_R_3        = _mm_max_ps( __Zero, __V_R_3);
+      __SC_2         = _mm_max_ps(__SC_2, __V_R_2);
+       _mm_store_ps(&Sc[iprf+8 ], __SC_2);
+     
+     
+      __SC_3 = _mm_max_ps(__SC_3, __V_R_3);
+      _mm_store_ps(&Sc[iprf+12], __SC_3);
+      
+      iprf+= 16;
+    
+      if ( iprf<Profile_Length) goto Loop;
+
+#endif
+    
+    // Swap pointers
+    float * ptr = v_w;
+    v_w = (float*) v_r;
+    v_r = (const float*) ptr;
+
+    // Update Score
+    //Score += max;
+  }
+
+  for (iprf=0; iprf<Profile_Length; ++iprf) 
+   Score += Sc[iprf];
+   
+  return (unsigned int) Score;
+}
diff --git a/src/C/sse2/sse2_inline_fcts.h b/src/C/sse2/sse2_inline_fcts.h
new file mode 100644
index 0000000..0dbd5ca
--- /dev/null
+++ b/src/C/sse2/sse2_inline_fcts.h
@@ -0,0 +1,113 @@
+/*******************************************************
+                        PFTOOLS
+ *******************************************************
+  Sep 30, 2011 sse2_inline_fcts.h
+ *******************************************************
+ (C) 2011 Swiss Institute of Bioinformatics
+     Thierry Schuepbach (thierry.schuepbach at isb-sib.ch)
+ *******************************************************/
+
+#ifndef SSE2_INLINE_FCTS_H_
+#define SSE2_INLINE_FCTS_H_
+#include <emmintrin.h>
+// DOES NOT ZERO EXTEND
+//MOVSS __m128 _mm_load_ss(float * p) 
+//MOVSS void_mm_store_ss(float * p, __m128 a)
+//MOVSS __m128 _mm_move_ss(__m128 a, __m128 b)
+// DOES ZERO EXTEND, ALLOW from reg to xmm
+//MOVD __m64 _mm_cvtsi32_si64 (int i )
+//MOVD int _mm_cvtsi64_si32 ( __m64m ) 
+//MOVD __m128i _mm_cvtsi32_si128 (int a) 
+//MOVD int _mm_cvtsi128_si32 ( __m128i a)
+
+  
+extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_my_cvtpi16_epi32_add_cvt_ps (const short int * const address, const __m128i __B)
+{
+  // Load short integer
+  __m128i __A = _mm_loadl_epi64((__m128i*) address);
+  // Convert signed WORD into signed DWORD
+  const __m128i __sign = _mm_cmpgt_epi16((__m128i) _mm_setzero_si128(), __A);
+  // Interleave sign with data to produce a 128 bit (4 x DWORD)
+  __A = _mm_unpacklo_epi16 (__A, __sign);
+  // Add __B to __A
+  __A = _mm_add_epi32(__A, __B);
+  // Convert the doublewords to floating point two at a time.
+  return _mm_cvtepi32_ps(__A);
+}
+
+extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_my_cvtsi16_ps(const __m64 * const address)
+{
+  // Load short integer
+  __m128i __A = _mm_loadl_epi64((__m128i*) address);
+  // Convert signed WORD into signed DWORD
+  const __m128i __sign = _mm_cmpgt_epi16((__m128i) _mm_setzero_si128(), __A);
+  // Interleave sign with data to produce a 128 bit (4 x DWORD)
+  __A = _mm_unpacklo_epi16 (__A, __sign);
+  // Convert the doublewords to floating point two at a time.
+  return _mm_cvtepi32_ps (__A);
+}
+
+extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_my_cvtdw_ss(const short int value)
+{
+  return (__m128) _mm_cvtsi32_ss(_mm_setzero_ps(),(int) value);
+}
+
+extern  __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_my_cvtpi16_ps_add_ps(const __m64 * const address, const __m128 __B)
+{
+  // Load short integer
+  __m128i __A = _mm_loadl_epi64((__m128i*) address);
+  // Convert signed WORD into signed DWORD
+  const __m128i __sign = _mm_cmpgt_epi16((__m128i) _mm_setzero_si128(), __A);
+  // Interleave sign with data to produce a 128 bit (4 x DWORD)
+  __A = _mm_unpacklo_epi16 (__A, __sign);
+  // Convert the doublewords to floating point two at a time.
+  __m128 __Af = _mm_cvtepi32_ps(__A);
+  // Convert the doublewords to floating point two at a time.
+  return _mm_add_ps(__Af, __B);
+}
+
+extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_my_cvtepi16_epi32(const __m128i __Value)
+{
+  // Convert signed WORD into signed DWORD
+  const __m128i __sign = _mm_cmpgt_epi16((__m128i) _mm_setzero_si128(), __Value);
+  // Interleave sign with data to produce a 128 bit (4 x DWORD)
+  return  _mm_unpacklo_epi16 (__Value, __sign); 
+}
+
+extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_my_blendv_epi8(const __m128i __A, const __m128i __B, const __m128i __Mask)
+{
+    __m128i __tmpA = _mm_andnot_si128(__Mask, __A);
+    __m128i __tmpB = _mm_and_si128(__B, __Mask);
+    return _mm_or_si128(__tmpA, __tmpB);
+}
+
+extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_my_insert_epi32_POS1(__m128i __A, const int B)
+{
+  __m128i __x = _mm_cvtsi32_si128(B);
+  __m128i __y = _mm_unpacklo_epi32(__A, __x);
+  __asm__ __volatile__ (" movsd %1, %0 " : "=x"(__A) : "x"(__y), "0"(__A) );
+  return __A;
+}
+
+extern __inline __m128 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_my_insert_ss_ps_POS1(__m128 __A, const __m128 __B)
+{
+  __m128 __y = _mm_unpacklo_ps(__A, __B);
+  __A        = (__m128) _mm_move_sd ((__m128d)__A, (__m128d) __y);
+  return __A;
+}
+
+extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_my_insert_epi32_POS0(__m128i __A, const int B)
+{
+  __m128i __tmp = _mm_cvtsi32_si128(B);
+  return _mm_or_si128(_mm_and_si128(__A, _mm_set_epi32(-1,-1,-1,0)), __tmp);
+}
+#endif
\ No newline at end of file
diff --git a/src/C/sse2/xali1_sse2.c b/src/C/sse2/xali1_sse2.c
new file mode 100644
index 0000000..05c1409
--- /dev/null
+++ b/src/C/sse2/xali1_sse2.c
@@ -0,0 +1,245 @@
+/*******************************************************
+                        PFTOOLS
+ *******************************************************
+  Sep 30, 2011 xali1_sse2.c
+ *******************************************************
+ (C) 2011 Swiss Institute of Bioinformatics
+     Thierry Schuepbach (thierry.schuepbach at isb-sib.ch)
+ *******************************************************/
+#include <stdlib.h>
+#include <inttypes.h>
+#include "profile.h"
+#include "sse2_inline_fcts.h"
+#define MAX(a,b) (a>b) ? a : b
+
+int xali1_sse2(const struct Profile * const restrict prf, const unsigned char * const restrict Sequence,
+                int * const WORK, const size_t BSEQ, const size_t LSEQ, const int CutOff, const _Bool LOPT)
+/*
+ * WARNING: for SSE version, WORK should be 4 times the (profile size + 1) + 63 to align to cache line
+ */
+{
+  float lScore = (float) NLOW;
+  union { int i; float f;} Transfer;
+  union lScores KOPD;
+  __m128 __lScore;
+  
+  const sIOP * restrict IOP_R;
+  sIOP * restrict IOP_W = (sIOP*) WORK;
+
+  register const TransitionScores * const restrict Transitions = prf->Scores.Insertion.Transitions;
+  const short int * const restrict Match = prf->Scores.Match.Alphabet;
+  const short int * const restrict Insertion = prf->Scores.Insertion.Alphabet;
+  const size_t AlignStep = prf->Scores.Match.AlignStep;
+
+  /* NOTE: The following part could be replaced and performed only once for a profile as it
+   *       is profile dependent. Nevertheless it does a good job loading Match and Transition
+   *       matrices into the cache hierarchy.
+   */
+  {
+    register const short int * restrict lMatch = (const short int *) &Match[_D];
+    register const ScoreTuple * restrict FirstSequenceProtein = prf->Scores.Insertion.FirstSequenceProtein;
+    __m128 __temp       = _my_cvtsi16_ps(&(FirstSequenceProtein[0].mm));
+    KOPD.xmmf           = _mm_move_ss(_mm_setzero_ps(), __temp);
+    StoreMatchInsertion(&(IOP_W[0].mm), __temp);
+    FirstSequenceProtein++;
+    register const TransitionScores (* restrict pTransitions) = &Transitions[1];
+    register sIOP * restrict pIOP = &IOP_W[1];
+    register int Length = - (int) prf->Length;
+
+//     while (Length-- != 0) {
+    do {
+      register __m128 __KD = _mm_add_ss(KOPD.xmmf, _my_cvtdw_ss(*lMatch));
+      lMatch += AlignStep;
+      
+      // dispatch value to all tuple
+      __KD = _mm_shuffle_ps(__KD, __KD, _MM_SHUFFLE(0,0,0,0));
+      
+      // Load Transitions / Convert signed WORD into float / Add KD to Transitions
+      __m128 __Transitions = _my_cvtpi16_ps_add_ps(&(pTransitions->From[DELETION].mm), __KD);
+      
+      // Move to next profile transitions
+      pTransitions++;
+
+      // Load FirstSequenceProtein / Convert signed WORD into float
+      __m128 __FirstSequenceProtein = _my_cvtsi16_ps(&(FirstSequenceProtein[0].mm));
+      
+      // Move to next profile First Sequence
+      FirstSequenceProtein++;
+      
+      // Get maximum
+      __m128 __max = _mm_max_ps(__Transitions, __FirstSequenceProtein);
+
+      // Store IOPI and IOPM
+      StoreMatchInsertion( &(pIOP->mm), (__m128) __max);
+      pIOP++;
+      
+      // Set KOPD
+      KOPD.xmmf = _mm_move_ss(_mm_setzero_ps(), __max);
+
+      Length++;
+    } while (Length < 0);
+  }
+
+  // Swap and assign Read and write pointers
+  IOP_R = IOP_W;
+  IOP_W = (sIOP*) (((uintptr_t) &WORK[2*(prf->Length+1)] + 63) & ~63);
+  
+#ifdef XALI1_DEBUG
+  fprintf(stdout,"XALI1 SCORE %12i\n", (int) lScore);
+#endif
+  __asm__ (" movss %1,%0" : "=x"(__lScore) : "m"(lScore));
+  
+  for ( int iseq=BSEQ; iseq < LSEQ-1; ++iseq) {
+//       printf("%i %i\t", iseq+1, (int) lScore);
+    register const size_t j1 = (size_t) Sequence[iseq];
+    register const short int * restrict lInsertion = Insertion;
+    {
+      register float KI = IOP_R[0].Elementf.I + (float) lInsertion[j1];
+
+      // Transform KI into a vector
+      __m128 __KI = _mm_set1_ps(KI);
+      // Load Transitions / Convert signed WORD into float / Add KI to Transition
+      __m128 __TransitionsI = _my_cvtpi16_ps_add_ps(&(Transitions[0].From[INSERTION].mm), __KI);
+      
+      // Load Transitions and Convert signed WORD into float
+      union lScores __TransitionsX = { xmmf: _my_cvtsi16_ps(&(Transitions[0].From[EXTRA].mm))};     
+      // Insert lScore into __TransitionsX
+      __TransitionsX.xmmf = _my_insert_ss_ps_POS1(__TransitionsX.xmmf, __lScore);
+
+      // Get maximum 
+      __TransitionsX.xmmf = _mm_max_ps(__TransitionsI, __TransitionsX.xmmf);
+
+      // Store IOPI and IOPM
+      StoreMatchInsertion( &(IOP_W[0].mm), (__m128) __TransitionsX.xmmf);
+      
+      // Store KOPD
+      KOPD.xmmf = _mm_move_ss(KOPD.xmmf, __TransitionsX.xmmf);
+      
+      __lScore = _mm_shuffle_ps(__TransitionsX.xmmf, __TransitionsX.xmmf, _MM_SHUFFLE(1,1,1,1));
+#ifdef XALI1_DEBUG
+      fprintf(stdout,"XALI1 SCORE SEQ %i %12i\n", iseq, _mm_cvttss_si32(__lScore));
+#endif
+    }
+    
+    lInsertion += AlignStep;
+    register const short int * restrict lMatch = Match;
+   
+    
+    for (int iprf=1; iprf<=prf->Length; ++iprf ) {
+      const float KM = IOP_R[iprf-1].Elementf.M + (float) lMatch[j1];
+      const float KI = IOP_R[iprf].Elementf.I   + (float) lInsertion[j1];
+      union lScores KD    = { xmmf: _mm_add_ss(KOPD.xmmf, _my_cvtdw_ss(lMatch[_D]))} ;
+      
+      lMatch     += AlignStep;
+      lInsertion += AlignStep;
+            
+      // Transform KM into a vector
+      __m128 __KM = _mm_set1_ps(KM);
+      // Load Transitions / Convert signed WORD into float / Add KM to Transition
+      __m128 __TransitionsM = _my_cvtpi16_ps_add_ps(&(Transitions[iprf].From[MATCH].mm), __KM);
+
+      // Transform KI into a vector
+      __m128 __KI = _mm_set1_ps(KI);
+      // Load Transitions / Convert signed WORD into float / Add KI to Transition
+      __m128 __TransitionsI = _my_cvtpi16_ps_add_ps(&(Transitions[iprf].From[INSERTION].mm), __KI);
+      
+#ifdef XALI1_DEBUG
+      fprintf(stdout,"XALI1 M    SEQ %4i %12i %12i %12i %12i\n", iseq, Transitions[iprf].From[MATCH].To[MATCH],
+	Transitions[iprf].From[MATCH].To[INSERTION],Transitions[iprf].From[MATCH].To[DELETION],Transitions[iprf].From[MATCH].To[EXTRA]);
+      fprintf(stdout,"XALI1 I    SEQ %4i %12i %12i %12i %12i\n", iseq, Transitions[iprf].From[INSERTION].To[MATCH],
+	Transitions[iprf].From[INSERTION].To[INSERTION],Transitions[iprf].From[INSERTION].To[DELETION],Transitions[iprf].From[INSERTION].To[EXTRA]);
+      fprintf(stdout,"XALI1 D    SEQ %4i %12i %12i %12i %12i\n", iseq, Transitions[iprf].From[DELETION].To[MATCH],
+	Transitions[iprf].From[DELETION].To[INSERTION],Transitions[iprf].From[DELETION].To[DELETION],Transitions[iprf].From[DELETION].To[EXTRA]);
+      fprintf(stdout,"XALI1 X    SEQ %4i %12i %12i %12i %12i\n", iseq, Transitions[iprf].From[EXTRA].To[MATCH],
+	Transitions[iprf].From[EXTRA].To[INSERTION],Transitions[iprf].From[EXTRA].To[DELETION],Transitions[iprf].From[EXTRA].To[EXTRA]);
+      fprintf(stdout,"XALI1 KMID SEQ %4i %12i %12i %12i %12i\n", iseq, (int) KM, (int) KI, (int) KD.Elementf[0], 0);
+#endif      
+      // Get maximum 
+      const __m128 __max1 = _mm_max_ps(__TransitionsM, __TransitionsI);
+
+       // Load Transitions and Convert signed WORD into float
+      union lScores __TransitionsX = { xmmf: _my_cvtsi16_ps(&(Transitions[iprf].From[EXTRA].mm))};     
+      // Insert lScore into __TransitionsX
+      __TransitionsX.xmmf = _my_insert_ss_ps_POS1(__TransitionsX.xmmf, __lScore);
+
+      // Transform KD into a vector
+      KD.xmmf = _mm_shuffle_ps(KD.xmmf, KD.xmmf, _MM_SHUFFLE(0,0,0,0));
+      // Load Transitions / Convert signed WORD into float / Add KD to Transition
+      __m128 __TransitionsD = _my_cvtpi16_ps_add_ps(&(Transitions[iprf].From[DELETION].mm), KD.xmmf);
+  
+      
+      // Get maximum / Set KOPD
+      __TransitionsX.xmmf = _mm_max_ps(__TransitionsD, __TransitionsX.xmmf);
+      KOPD.xmmf           = _mm_max_ps(__max1, __TransitionsX.xmmf);
+
+      // Store IOPI and IOPM
+      StoreMatchInsertion( &(IOP_W[iprf].mm), (__m128) KOPD.xmmf);
+
+      __lScore = _mm_shuffle_ps(KOPD.xmmf, KOPD.xmmf, _MM_SHUFFLE(1,1,1,1));
+#ifdef XALI1_DEBUG
+      fprintf(stdout,"XALI1 SCORE SEQ %4i %12i %8.1f %8.1f %8.1f %8.1f\n", iseq, _mm_cvttss_si32(__lScore),
+	      KOPD.Elementf[2], KOPD.Elementf[3], KOPD.Elementf[0], KOPD.Elementf[1]);
+#endif
+//       printf("%i %i\t\t%i\t%i\t\t%i\t%i\t%i\t\t%i\t%i\t\t%i\n",
+//              iseq, iprf,
+//              (int) IOP_W[iprf].Elementf.M, (int) IOP_W[iprf].Elementf.I,
+//              (int)KM, (int)KI, (int)KD.Elementf[0], (int) 0, (int) KOPD.Elementf[DELETION],
+//              (int)lScore);
+
+    } //while (++iprf <= prf->Length);
+
+    // Swap Read and Write pointers
+    sIOP * ptr = IOP_W;
+    IOP_W = (sIOP*) IOP_R;
+    IOP_R = ptr;
+    
+    if ( ! LOPT ) {
+      __m128 __dummy;
+      __asm__ ("cvtsi2ss  %1, %0" : "=x"(__dummy) : "m"(CutOff));
+      if (_mm_comige_ss(__lScore, __dummy)) {
+	return _mm_cvttss_si32(__lScore);
+      }
+    }
+  } 
+  int iScore = _mm_cvttss_si32(__lScore);
+  {
+    register const short int * restrict lInsertion = Insertion;
+    const int j1 = (int) Sequence[LSEQ-1];
+    int iKOPM    = (int) IOP_R[0].Elementf.M;
+    int KI       = (int) IOP_R[0].Elementf.I + (int) lInsertion[j1];
+   
+    int iKOPD    = MAX( KI + (int) Transitions[0].Element[_ID],      (int) Transitions[0].Element[_XD] );
+    register const ScoreTuple * const restrict LastSequenceProtein = prf->Scores.Insertion.LastSequenceProtein;
+    iScore = MAX( iScore, KI + (int) LastSequenceProtein[0].From[INSERTION] );
+  
+    register const short int * restrict lMatch = Match;
+    lInsertion += AlignStep;
+    register const int itmp = prf->Length;
+    for (int iprf=1; iprf<=itmp; ++iprf) {
+      const int KM = iKOPM                        + (int) lMatch[j1];
+      KI           = (int) IOP_R[iprf].Elementf.I + (int) lInsertion[j1];
+      const int KD = iKOPD                        + (int) lMatch[_D];
+
+      lMatch     += AlignStep;
+      lInsertion += AlignStep;
+
+      iKOPM = (int) IOP_R[iprf].Elementf.M;
+
+      const float tIOPD1 = MAX( KM + (int) Transitions[iprf].Element[_MD],      (int) Transitions[iprf].Element[_XD] );
+      const float tIOPD2 = MAX( KI + (int) Transitions[iprf].Element[_ID], KD + (int) Transitions[iprf].Element[_DD] );
+      iKOPD              = MAX( tIOPD1, tIOPD2);
+
+      const int tIOPT1 = MAX( KM + (int) LastSequenceProtein[iprf].From[MATCH], KI + (int) LastSequenceProtein[iprf].From[INSERTION] );
+      const int tIOPT2 = MAX( iScore                                          , KD + (int) LastSequenceProtein[iprf].From[DELETION] );
+      iScore           = MAX( tIOPT1, tIOPT2);
+#ifdef XALI1_DEBUG
+      fprintf(stdout,"XALI1 SCORE %12i\n", iScore);
+#endif
+    }
+  }
+  //printf("That one went to the end\n");
+  return iScore;
+}
+
+
+#undef MAX
diff --git a/src/C/sse2/xalip_sse2.c b/src/C/sse2/xalip_sse2.c
new file mode 100644
index 0000000..b3d4400
--- /dev/null
+++ b/src/C/sse2/xalip_sse2.c
@@ -0,0 +1,785 @@
+/*******************************************************
+                        PFTOOLS
+ *******************************************************
+  Sep 30, 2011 xalip_sse2.c
+ *******************************************************
+ (C) 2011 Swiss Institute of Bioinformatics
+     Thierry Schuepbach (thierry.schuepbach at isb-sib.ch)
+ *******************************************************/
+#include <stdlib.h>
+#ifdef XALIP_DEBUG
+#  include <stdio.h>
+#endif
+
+#include "profile.h"
+#include "sse2_inline_fcts.h"
+
+#define MAX(a,b) (a>b) ? a : b
+#define MIN(a,b) (a<b) ? a : b
+
+struct Minima {
+   int _a;
+   int _b;
+   int _c;
+};
+
+
+static void InitR(const int iseq, const size_t N1, const size_t N2, const size_t bseq, const size_t lseq,
+                  union lScores * const restrict iop, union Positions * const restrict iom,
+                  union Positions * const restrict ioi,  const struct Profile * const restrict prf) 
+{
+  int KOPD;
+#ifdef XALIP_DEBUG
+  fprintf(stdout,"XALIP InitR called with index %i bseq %lu\n",iseq, bseq);
+#endif
+  // Are we treating sequence index below given start?
+  register const ScoreTuple * restrict FirstSequenceProtein = ( iseq < bseq ) 
+      ? &(prf->Scores.Insertion.FirstSequenceProtein[0])
+      : &(prf->Scores.Insertion.Transitions->From[EXTRA]);
+  const size_t FirstSequenceProteinAlignStep = (iseq < bseq) ? 1 : 4;
+	  
+  register int (* restrict pIOP)[4] = &(iop[0].Element);
+  
+  for (int i=0; i<4; ++i) {
+    pIOP[0][i] = (int) FirstSequenceProtein->To[i];
+  }
+  
+  // Set KOPD
+  KOPD = pIOP[0][DELETION];
+
+  register const TransitionScores * const restrict Transitions = prf->Scores.Insertion.Transitions;
+  register const short int * restrict pMatch       = &prf->Scores.Match.Alphabet[_D]; 
+  const size_t AlignStep = prf->Scores.Match.AlignStep;
+  
+  // Move to next profile First Sequence
+  FirstSequenceProtein += FirstSequenceProteinAlignStep;
+  
+  for (unsigned int iprf=1; iprf<=(unsigned int) prf->Length; ++iprf) {
+    register const int KD = KOPD + (int) *pMatch;
+    pMatch += AlignStep;
+    
+    // Load Transitions
+    int __Transitions[4];
+    __Transitions[MATCH]     = KD + (int) Transitions[iprf].From[DELETION].To[MATCH];
+    __Transitions[INSERTION] = KD + (int) Transitions[iprf].From[DELETION].To[INSERTION];
+    __Transitions[DELETION]  = KD + (int) Transitions[iprf].From[DELETION].To[DELETION];
+    __Transitions[EXTRA]     = KD + (int) Transitions[iprf].From[DELETION].To[EXTRA];
+	  
+    // Move to next profile First Sequence
+    FirstSequenceProtein += FirstSequenceProteinAlignStep;
+    
+    // Get maximum
+    int __FirstSequenceProtein[4];
+    for (int i=0; i<4; ++i) {
+      __FirstSequenceProtein[i] = (int) FirstSequenceProtein->To[i];
+      pIOP[iprf][i] = (__Transitions[i] > __FirstSequenceProtein[i]) ? __Transitions[i] : __FirstSequenceProtein[i];
+    }
+    
+    // Set KOPD ( this is SSE 4.1 )
+    KOPD = pIOP[iprf][DELETION];
+  } 
+	      
+  union Positions TPOS __attribute__((aligned(16)));
+  TPOS.Element.One   = lseq + 1;
+  TPOS.Element.Two   = 0;
+  TPOS.Element.B     = iseq + 1;
+  TPOS.Element.dummy = 0;
+  
+  for (unsigned int iprf=0; iprf<(unsigned int) (N1-1); ++iprf) {
+    _mm_store_si128(&(iom[iprf].xmm), TPOS.xmm);
+    _mm_store_si128(&(ioi[iprf].xmm), TPOS.xmm);
+  }
+
+  if (N1 == 0) { fputs("BUG HERE N1 is NULL\n", stderr); exit(1);}
+  ioi[N1-1].xmm = TPOS.xmm; // Warning N1 > 0 ?
+  TPOS.Element.One = TPOS.Element.B;
+  TPOS.Element.Two = TPOS.Element.B;
+  iom[N1-1].xmm = TPOS.xmm;
+
+  for (unsigned int iprf=N1; iprf<(unsigned int)N2; ++iprf) {
+    _mm_store_si128(&(iom[iprf].xmm), TPOS.xmm);
+    _mm_store_si128(&(ioi[iprf].xmm), TPOS.xmm);
+  } 
+	 
+  TPOS.Element.One = lseq + 1;
+  TPOS.Element.Two = 0;
+	
+  for (unsigned int iprf=(unsigned int) N2; iprf<=(unsigned int)prf->Length; ++iprf) {
+    _mm_store_si128(&(iom[iprf].xmm), TPOS.xmm);
+    _mm_store_si128(&(ioi[iprf].xmm), TPOS.xmm);
+  }
+}
+
+static void nextR(const struct Profile * const restrict prf, const unsigned char * const restrict Sequence,
+                  const int iseq, union lScores * const restrict iop, union Positions * const restrict iom,
+                  union Positions * const restrict ioi,const int lseq, struct Alignment * const restrict alignment,
+                  struct Minima * const restrict ifer, const _Bool Lock, const size_t N1, const size_t N2)
+{
+#ifdef XALIP_DEBUG
+   fprintf(stdout,"XALIP NextR called with iseq %i\n",iseq);
+#endif
+   // Initialization
+   const unsigned int In = iseq + 1;
+   // WARNING: Fortran uses a 1 based index for sequence
+   const unsigned int SequenceIndex = (unsigned int) Sequence[iseq-1];
+   
+   if ( iseq >= lseq) {
+      fputs("nextR_last should have been called\n", stderr);
+      exit(1);   
+   } 
+   
+   // Disable match and insert vertices of protected region
+   if (Lock) {
+      iop[N1-1].Element[MATCH] = NLOW;
+      for (size_t iprf=N1; iprf<N2; ++iprf) {
+         iop[iprf].Element[MATCH]     = NLOW;
+         iop[iprf].Element[INSERTION] = NLOW;
+      } 
+   }
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   // Profile position 0
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   
+   // Save previous match position
+   int Kopm = iop[0].Element[MATCH];
+   union Positions Kpos __attribute__((aligned(16)));
+   Kpos.xmm = iom[0].xmm;
+   
+   const union Positions TEMPpos __attribute__((aligned(16))) = { lseq+1, 0, In, 0 };
+   
+   const union Positions * restrict PTRpos[4];
+   union Positions Kiod;
+   PTRpos[0] = &TEMPpos;
+   PTRpos[1] = &Kpos;
+   PTRpos[3] = &Kiod;
+     
+   // Get pointers to score data
+   const TransitionScores * const restrict Transitions = prf->Scores.Insertion.Transitions;
+   const short int * restrict Insertion = prf->Scores.Insertion.Alphabet;
+   const size_t AlignStep = prf->Scores.Insertion.AlignStep;
+   
+   int Ki = iop[0].Element[INSERTION] + (int) Insertion[SequenceIndex];
+   
+   // Match position
+   int Ji   = Ki + (int) Transitions[0].From[INSERTION].To[MATCH];
+   int itmp = (int) Transitions[0].From[EXTRA].To[MATCH];
+   if ( Ji > itmp) {
+      iop[0].Element[MATCH] = Ji;
+      iom[0].xmm = ioi[0].xmm;
+   } else {
+      iop[0].Element[MATCH] = itmp;
+      iom[0].xmm = TEMPpos.xmm;
+   }
+   
+   // Deletion position
+   int Kopd;
+   Ji   = Ki + (int) Transitions[0].From[INSERTION].To[DELETION];
+   itmp = (int) Transitions[0].From[EXTRA].To[DELETION];
+   if ( Ji > itmp ) {
+      Kopd     = Ji;
+      Kiod.xmm = ioi[0].xmm;
+   } else {
+      Kopd     = itmp;
+      Kiod.xmm = TEMPpos.xmm; 
+   } 
+
+   // Insertion position
+   Ji   = Ki + (int) Transitions[0].From[INSERTION].To[INSERTION];
+   itmp = (int) Transitions[0].From[EXTRA].To[INSERTION];
+   if ( Ji > itmp ) {
+      iop[0].Element[INSERTION] = Ji;
+   } else {
+      iop[0].Element[INSERTION] = itmp;
+      ioi[0].xmm = TEMPpos.xmm;
+   }
+   
+   // Initialize minima
+   ifer->_a = iseq;
+   ifer->_b = iseq;
+   itmp     = MIN(ioi[0].Element.B, iom[0].Element.B);
+   ifer->_c = MIN(itmp, Kiod.Element.B); 
+   
+   // Initialize alignment
+   union Positions Fpos __attribute__((aligned(16)));;
+   Fpos.Element.One   = alignment->JAL1;
+   Fpos.Element.Two   = alignment->JAL2;
+   Fpos.Element.B     = alignment->JALB;
+   Fpos.Element.dummy = 0;
+   
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   // Loop through rest of profile
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   const short int * restrict Match = prf->Scores.Match.Alphabet;
+   Insertion += AlignStep;
+   
+   for (int iprf=1; iprf<=prf->Length; ++iprf) {
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Match
+      const register int KM = Kopm + (int) Match[SequenceIndex];
+      Kopm = iop[iprf].Element[MATCH];
+      
+      __m128i __KM = _mm_set1_epi32(KM);
+      // Load Transitions
+      __m128i __TransitionsM = _mm_loadl_epi64((__m128i*) &(Transitions[iprf].From[MATCH]));
+      // Convert signed WORD into signed DWORD
+      __TransitionsM = _my_cvtepi16_epi32(__TransitionsM);
+      // Add KM to Transitions
+      __TransitionsM = _mm_add_epi32(__TransitionsM, __KM);
+      
+
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Insertion
+      const register int KI = iop[iprf].Element[INSERTION] + (int) Insertion[SequenceIndex]; 
+      // one could move on the seq index instead
+      
+      __m128i __KI = _mm_set1_epi32(KI);
+      // Load Transitions
+      __m128i __TransitionsI = _mm_loadl_epi64((__m128i*) &(Transitions[iprf].From[INSERTION]));
+      // Convert signed WORD into signed DWORD
+      __TransitionsI = _my_cvtepi16_epi32(__TransitionsI);
+      // Add KM to Transitions
+      __TransitionsI = _mm_add_epi32(__TransitionsI, __KI);
+      
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Deletion
+      const register int KD = Kopd + (int) Match[_D];   
+      
+      __m128i __KD = _mm_set1_epi32(KD);
+      // Load Transitions
+      __m128i __TransitionsD = _mm_loadl_epi64((__m128i*) &(Transitions[iprf].From[DELETION]));
+      // Convert signed WORD into signed DWORD
+      __TransitionsD = _my_cvtepi16_epi32(__TransitionsD);
+      // Add KM to Transitions
+      __TransitionsD = _mm_add_epi32(__TransitionsD, __KD);
+      
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Extensions
+      // Load Transitions
+      __m128i __TransitionsX = _mm_loadl_epi64((__m128i*) &(Transitions[iprf].From[EXTRA]));
+      // Convert signed WORD into signed DWORD
+      __TransitionsX = _my_cvtepi16_epi32(__TransitionsX);
+      
+      // Insert NLOW into Extension vector -> done in io.c
+      //__TransitionsX = _mm_insert_epi32(__TransitionsX, NLOW, DUMMY);
+      
+      // Move to next profile index
+      Match     += AlignStep;
+      Insertion += AlignStep;
+
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Compute Maxima (Fortran Nstep function)
+      union lScores Index = { xmm: (__m128i) _mm_setzero_si128()};
+      __m128i __three = _mm_set_epi32(3,3,3,3);
+      
+      __m128i  __Mask = _mm_cmpgt_epi32(__TransitionsD, __TransitionsX);
+      __TransitionsX  = _my_blendv_epi8(__TransitionsX, __TransitionsD, __Mask);
+      Index.xmm       = _my_blendv_epi8(Index.xmm, __three, __Mask);
+      
+      __m128i __One  = _mm_set_epi32(1,1,1,1);
+      __Mask         = _mm_cmpgt_epi32(__TransitionsM, __TransitionsX);
+      __TransitionsX = _my_blendv_epi8(__TransitionsX, __TransitionsM, __Mask);
+      Index.xmm      = _my_blendv_epi8(Index.xmm, __One, __Mask);
+      
+      __m128i __Two  = _mm_add_epi32(__One, __One);
+      __Mask         = _mm_cmpgt_epi32(__TransitionsI, __TransitionsX);
+      __TransitionsX = _my_blendv_epi8(__TransitionsX, __TransitionsI, __Mask);
+      Index.xmm      = _my_blendv_epi8(Index.xmm, __Two, __Mask);
+      
+      // Set new data
+      iop[iprf].xmm = __TransitionsX;
+      //StoreMatchInsertion((__m64*) &iop[iprf],(__m128) __TransitionsX);
+      Kopd = _mm_cvtsi128_si32 ( __TransitionsX);
+      
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Check for new maxima
+      __TransitionsX = _mm_srli_si128(__TransitionsX, 4);
+      const int KE = _mm_cvtsi128_si32 ( __TransitionsX);
+      
+      if (KE > alignment->JALS) {
+         alignment->JALS = KE;
+         alignment->JALE = iseq;
+         Fpos.xmm = ioi[iprf].xmm;
+	 
+         if (Index.Element[DUMMY] == 1)  { // KM is max
+               Fpos.xmm = Kpos.xmm;
+         } else if (Index.Element[DUMMY] == 3) { // KD is max
+               Fpos.xmm = Kiod.xmm;
+         }
+      }
+#ifdef XALIP_DEBUG
+      printf("XALIP FPOS %8i %8i %8i\n", Fpos.Element.One, Fpos.Element.Two, Fpos.Element.B);
+#endif
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Update alignment positions
+      union Positions Jpos __attribute__((aligned(16)));
+      Jpos.xmm  = iom[iprf].xmm;
+      PTRpos[2] = &ioi[iprf];
+      
+      iom[iprf].xmm  = PTRpos[Index.Element[MATCH]]->xmm;
+      Kiod.xmm       = PTRpos[Index.Element[DELETION]]->xmm;
+      ioi[iprf].xmm  = PTRpos[Index.Element[INSERTION]]->xmm;
+      
+      Kpos.xmm = Jpos.xmm;
+      
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Update minima
+      
+      const int t1 = MIN(ioi[iprf].Element.One, iom[iprf].Element.One);
+      const int t2 = MIN(t1, Kiod.Element.One);
+      ifer->_a     = MIN(ifer->_a, t2);
+      
+      if (iprf > N1) {
+         ifer->_b = MIN(ifer->_b, t2);   
+      }
+      const int t3 = MIN(ioi[iprf].Element.B, iom[iprf].Element.B);
+      const int t4 = MIN(t3, Kiod.Element.B);
+      ifer->_c     = MIN(ifer->_c, t4);  
+   }
+   
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   // Epilogue
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   
+   // Finish updating alignment positions
+   alignment->JAL1 = Fpos.Element.One;
+   alignment->JAL2 = Fpos.Element.Two;
+   alignment->JALB = Fpos.Element.B;
+   
+   // Entry and exit from protected regions
+   iom[N1-1].Element.One = MIN(iom[N1-1].Element.One, In);
+   iom[N1-1].Element.Two = In;
+   
+   for (int iprf=N1; iprf<N2; ++iprf) {
+      iom[iprf].Element.One = MIN(iom[iprf].Element.One, In);
+      iom[iprf].Element.Two = In;
+   
+      ioi[iprf].Element.One = MIN(ioi[iprf].Element.One, In);
+      ioi[iprf].Element.Two = In;
+   }  
+   
+#ifdef XALIP_DEBUG
+   for (int iprf=0; iprf<=prf->Length; ++iprf) {
+      printf("XALIP NEXTR IOP %4.4i %15i %15i %15i\n", iprf, iop[iprf].Element[MATCH], iop[iprf].Element[INSERTION],
+             iop[iprf].Element[DELETION]);
+      printf("XALIP NEXTR IOM %4.4i %15i %15i %15i\n", iprf, iom[iprf].Element.One, iom[iprf].Element.Two,
+             iom[iprf].Element.B);
+      printf("XALIP NEXTR IOI %4.4i %15i %15i %15i\n", iprf, ioi[iprf].Element.One, ioi[iprf].Element.Two,
+             ioi[iprf].Element.B);
+      
+   }
+   
+   printf("XALIP NEXTR ALIGN %4i %4i %4i %4i %4i\n",
+                   alignment->JAL1, alignment->JAL2, alignment->JALS, alignment->JALB, alignment->JALE); 
+#endif
+}
+
+static void nextR_last(const struct Profile * const restrict prf, const unsigned char * const restrict Sequence,
+                       const int iseq, union lScores * const restrict iop, union Positions * const restrict iom,
+                       union Positions * const restrict ioi,const int lseq, struct Alignment * const restrict alignment,
+                       struct Minima * const restrict ifer, const _Bool Lock, const size_t N1, const size_t N2)
+{
+#ifdef XALIP_DEBUG
+   fprintf(stdout,"XALIP NextR_last called with iseq %i\n",iseq);
+#endif
+   // Initialization
+   const unsigned int In = iseq + 1;
+   // WARNING: Fortran uses a 1 based index for sequence
+   const unsigned int SequenceIndex = (unsigned int) Sequence[iseq-1];
+   
+   if ( iseq < lseq) {
+      fputs("nextR should have been called\n", stderr);
+      exit(1);   
+   } 
+   
+   // Disable match and insert vertices of protected region
+   if (Lock) {
+      iop[N1-1].Element[MATCH] = NLOW;
+      for (size_t iprf=N1; iprf<N2; ++iprf) {
+         iop[iprf].Element[MATCH]     = NLOW;
+         iop[iprf].Element[INSERTION] = NLOW;
+      } 
+   }
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   // Profile position 0
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   
+   // Save previous match position
+   int Kopm = iop[0].Element[MATCH];
+   union Positions Kpos __attribute__((aligned(16)));
+   Kpos.xmm = iom[0].xmm;
+   
+   const union Positions TEMPpos __attribute__((aligned(16))) = { lseq+1, 0, In, 0 };
+   
+   const union Positions * restrict PTRpos[4];
+   union Positions Kiod;
+   PTRpos[0] = &TEMPpos;
+   PTRpos[1] = &Kpos;
+   PTRpos[3] = &Kiod;
+     
+   // Get pointers to score data
+   const TransitionScores * const restrict Transitions = prf->Scores.Insertion.Transitions;
+   const short int * restrict Insertion = prf->Scores.Insertion.Alphabet;
+   const size_t AlignStep = prf->Scores.Insertion.AlignStep;
+   
+   int Ki = iop[0].Element[INSERTION] + (int) Insertion[SequenceIndex];
+   
+   // Match position
+   int Ji   = Ki + (int) Transitions[0].From[INSERTION].To[MATCH];
+   int itmp = (int) Transitions[0].From[EXTRA].To[MATCH];
+   if ( Ji > itmp) {
+      iop[0].Element[MATCH] = Ji;
+      iom[0].xmm = ioi[0].xmm;
+   } else {
+      iop[0].Element[MATCH] = itmp;
+      iom[0].xmm = TEMPpos.xmm;
+   }
+   
+   // Deletion position
+   int Kopd;
+   Ji   = Ki + (int) Transitions[0].From[INSERTION].To[DELETION];
+   itmp = (int) Transitions[0].From[EXTRA].To[DELETION];
+   if ( Ji > itmp ) {
+      Kopd     = Ji;
+      Kiod.xmm = ioi[0].xmm;
+   } else {
+      Kopd     = itmp;
+      Kiod.xmm = TEMPpos.xmm; 
+   } 
+
+   // Insertion position
+   Ji   = Ki + (int) Transitions[0].From[INSERTION].To[INSERTION];
+   itmp = (int) Transitions[0].From[EXTRA].To[INSERTION];
+   if ( Ji > itmp ) {
+      iop[0].Element[INSERTION] = Ji;
+   } else {
+      iop[0].Element[INSERTION] = itmp;
+      ioi[0].xmm = TEMPpos.xmm;
+   }
+   
+   // Initialize minima
+   ifer->_a = iseq;
+   ifer->_b = iseq;
+   itmp     = MIN(ioi[0].Element.B, iom[0].Element.B);
+   ifer->_c = MIN(itmp, Kiod.Element.B); 
+   
+   // Initialize alignment
+   union Positions Fpos __attribute__((aligned(16)));
+   Fpos.Element.One   = alignment->JAL1;
+   Fpos.Element.Two   = alignment->JAL2;
+   Fpos.Element.B     = alignment->JALB;
+   Fpos.Element.dummy = 0;
+   
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   // Loop through rest of profile
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   const short int * restrict Match = prf->Scores.Match.Alphabet;
+   const ScoreTuple * const restrict LastProteinSequence = prf->Scores.Insertion.LastSequenceProtein;
+   Insertion += AlignStep;
+   
+   for (int iprf=1; iprf<=prf->Length; ++iprf) {
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Match
+      const register int KM = Kopm + (int) Match[SequenceIndex];
+      Kopm = iop[iprf].Element[MATCH];
+      
+      __m128i __KM = _mm_set1_epi32(KM);
+      // Load Transitions
+      __m128i __TransitionsM = _mm_loadl_epi64((__m128i*) &(Transitions[iprf].From[MATCH]));
+      // Convert signed WORD into signed DWORD
+      __TransitionsM = _my_cvtepi16_epi32(__TransitionsM);
+      // Insert LastProteinSequence
+      __TransitionsM = _my_insert_epi32_POS1(__TransitionsM, (int) LastProteinSequence[iprf].From[MATCH]);
+      // Add KM to Transitions
+      __TransitionsM = _mm_add_epi32(__TransitionsM, __KM);
+      
+
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Insertion
+      const register int KI = iop[iprf].Element[INSERTION] + (int) Insertion[SequenceIndex]; 
+      // one could move on the seq index instead
+      
+      __m128i __KI = _mm_set1_epi32(KI);
+      // Load Transitions
+      __m128i __TransitionsI = _mm_loadl_epi64((__m128i*) &(Transitions[iprf].From[INSERTION]));
+      // Convert signed WORD into signed DWORD
+      __TransitionsI = _my_cvtepi16_epi32(__TransitionsI);
+      // Insert LastProteinSequence
+      __TransitionsI = _my_insert_epi32_POS1(__TransitionsI, (int) LastProteinSequence[iprf].From[INSERTION]);
+      // Add KM to Transitions
+      __TransitionsI = _mm_add_epi32(__TransitionsI, __KI);
+      
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Deletion
+      const register int KD = Kopd + (int) Match[_D];   
+      
+      __m128i __KD = _mm_set1_epi32(KD);
+      // Load Transitions
+      __m128i __TransitionsD = _mm_loadl_epi64((__m128i*) &(Transitions[iprf].From[DELETION]));
+      // Convert signed WORD into signed DWORD
+      __TransitionsD = _my_cvtepi16_epi32(__TransitionsD);
+      // Insert LastProteinSequence
+      __TransitionsD = _my_insert_epi32_POS1(__TransitionsD, (int) LastProteinSequence[iprf].From[DELETION]);
+      // Add KM to Transitions
+      __TransitionsD = _mm_add_epi32(__TransitionsD, __KD);
+      
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Extensions
+      // Load Transitions
+      __m128i __TransitionsX = _mm_loadl_epi64((__m128i*) &(Transitions[iprf].From[EXTRA]));
+      // Convert signed WORD into signed DWORD
+      __TransitionsX = _my_cvtepi16_epi32(__TransitionsX);
+      
+      // Insert NLOW into Extension vector -> done in io.c
+      //__TransitionsX = _mm_insert_epi32(__TransitionsX, NLOW, DUMMY);
+      
+      // Move to next profile index
+      Match     += AlignStep;
+      Insertion += AlignStep;
+
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Compute Maxima (Fortran Nstep function)
+      union lScores Index = { xmm: (__m128i) _mm_setzero_si128()} ;
+      __m128i __three = _mm_set_epi32(3,3,3,3);
+      
+      __m128i  __Mask = _mm_cmpgt_epi32(__TransitionsD, __TransitionsX);
+      __TransitionsX  = _my_blendv_epi8(__TransitionsX, __TransitionsD, __Mask);
+      Index.xmm       = _my_blendv_epi8(Index.xmm, __three, __Mask);
+      
+      __m128i __One  = _mm_set_epi32(1,1,1,1);
+      __Mask         = _mm_cmpgt_epi32(__TransitionsM, __TransitionsX);
+      __TransitionsX = _my_blendv_epi8(__TransitionsX, __TransitionsM, __Mask);
+      Index.xmm      = _my_blendv_epi8(Index.xmm, __One, __Mask);
+      
+      __m128i __Two  = _mm_add_epi32(__One, __One);
+      __Mask         = _mm_cmpgt_epi32(__TransitionsI, __TransitionsX);
+      __TransitionsX = _my_blendv_epi8(__TransitionsX, __TransitionsI, __Mask);
+      Index.xmm      = _my_blendv_epi8(Index.xmm, __Two, __Mask);
+      
+      // Set new data
+      iop[iprf].xmm = __TransitionsX;
+      //_mm_storel_pi((__m64*) &iop[iprf],(__m128) __TransitionsX);
+      Kopd = _mm_cvtsi128_si32(__TransitionsX);
+      
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Check for new maxima
+       __TransitionsX = _mm_srli_si128(__TransitionsX, 4);
+      const int KE = _mm_cvtsi128_si32 ( __TransitionsX);
+      if (KE > alignment->JALS) {
+         alignment->JALS = KE;
+         alignment->JALE = iseq;
+         Fpos.xmm = ioi[iprf].xmm;
+         if (Index.Element[DUMMY] == 1)  { // KM is max
+               Fpos.xmm = Kpos.xmm;
+         } else if (Index.Element[DUMMY] == 3) { // KD is max
+               Fpos.xmm = Kiod.xmm;
+         }
+      }
+#ifdef XALIP_DEBUG
+      printf("XALIP LAST FPOS %8i %8i %8i\n", Fpos.Element.One, Fpos.Element.Two, Fpos.Element.B);
+#endif
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Update alignment positions
+      union Positions Jpos __attribute__((aligned(16))); 
+      Jpos.xmm  = iom[iprf].xmm;
+      PTRpos[2] = &ioi[iprf];
+      
+      iom[iprf].xmm  = PTRpos[Index.Element[MATCH]]->xmm;
+      Kiod.xmm       = PTRpos[Index.Element[DELETION]]->xmm;
+      ioi[iprf].xmm  = PTRpos[Index.Element[INSERTION]]->xmm;
+      
+      Kpos.xmm = Jpos.xmm;
+      
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Update minima
+      
+      const int t1 = MIN(ioi[iprf].Element.One, iom[iprf].Element.One);
+      const int t2 = MIN(t1, Kiod.Element.One);
+      ifer->_a     = MIN(ifer->_a, t2);
+      
+      if (iprf > N1) {
+         ifer->_b = MIN(ifer->_b, t2);   
+      }
+      const int t3 = MIN(ioi[iprf].Element.B, iom[iprf].Element.B);
+      const int t4 = MIN(t3, Kiod.Element.B);
+      ifer->_c     = MIN(ifer->_c, t4);  
+   }
+   
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   // Epilogue
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   
+   // Finish updating alignment positions
+   alignment->JAL1 = Fpos.Element.One;
+   alignment->JAL2 = Fpos.Element.Two;
+   alignment->JALB = Fpos.Element.B;
+   
+   // Entry and exit from protected regions
+   iom[N1-1].Element.One = MIN(iom[N1-1].Element.One, In);
+   iom[N1-1].Element.Two = In;
+   
+   for (int iprf=N1; iprf<N2; ++iprf) {
+      iom[iprf].Element.One = MIN(iom[iprf].Element.One, In);
+      iom[iprf].Element.Two = In;
+   
+      ioi[iprf].Element.One = MIN(ioi[iprf].Element.One, In);
+      ioi[iprf].Element.Two = In;
+   }  
+   
+#ifdef XALIP_DEBUG
+   for (int iprf=0; iprf<=prf->Length; ++iprf) {
+      printf("XALIP NEXTR LAST IOP %4.4i %15i %15i %15i\n", iprf, iop[iprf].Element[MATCH], iop[iprf].Element[INSERTION],
+             iop[iprf].Element[DELETION]);
+      printf("XALIP NEXTR LAST IOM %4.4i %15i %15i %15i\n", iprf, iom[iprf].Element.One, iom[iprf].Element.Two,
+             iom[iprf].Element.B);
+      printf("XALIP NEXTR LAST IOI %4.4i %15i %15i %15i\n", iprf, ioi[iprf].Element.One, ioi[iprf].Element.Two,
+             ioi[iprf].Element.B);
+      
+   }
+   
+   printf("XALIP NEXTR LAST ALIGN %4i %4i %4i %4i %4i\n",
+                   alignment->JAL1, alignment->JAL2, alignment->JALS, alignment->JALB, alignment->JALE);
+#endif
+}
+
+int xalip_sse2( const struct Profile * const restrict prf, const unsigned char * const restrict Sequence,
+           union lScores * const restrict iop, union Positions * const restrict iom,
+           union Positions * const restrict ioi, const size_t bseq, const size_t lseq,
+           struct Alignment * const restrict alignment,
+           _Bool * const restrict Lock, const size_t N1, const size_t N2, const _Bool Lopt,
+           const int kcut, const size_t NALI)
+{
+   int iseq;
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   // Prelogue
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   
+   // Alignment list
+   int iopt = NLOW;
+   size_t nali = 0;
+   
+   // Search control fields
+   int ibeg    = bseq-1;
+   size_t jlcp = prf->Length / 2;
+   int nsca    = 0;
+   
+   // Stack Memory
+   struct Minima ifer __attribute__((aligned(16)));
+   
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   // Two step forward one step backward loop
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   MajorLoop:
+   
+   iseq = ibeg;
+   struct Alignment lAlignment;
+   lAlignment.JALS = NLOW;
+   lAlignment.JAL1 = 0;
+   lAlignment.JAL2 = 0;
+   lAlignment.JALB = 0;
+   lAlignment.JALE = 0;
+   
+   // Initiate work array
+   InitR(iseq, N1, N2, bseq, lseq, iop, iom, ioi, prf);
+#ifdef XALIP_DEBUG
+   for (size_t i=0; i<=prf->Length; ++i) {
+      printf("XALIP IOP %8i %8i %8i %8i\n",
+             iop[i].Element[MATCH], iop[i].Element[INSERTION], iop[i].Element[DELETION],
+             iop[i].Element[DUMMY]);
+      printf("XALIP IOM %8i %8i %8i %8i\n",
+             iom[i].Element.One, iom[i].Element.Two, iom[i].Element.B,
+             iom[i].Element.dummy);
+      printf("XALIP IOI %8i %8i %8i %8i\n",
+             ioi[i].Element.One, ioi[i].Element.Two, ioi[i].Element.B,
+             ioi[i].Element.dummy);          
+   }
+#endif
+   
+   // Initiate search control values
+   int ilcp = iseq;
+   int ifcp = iseq+1;
+   int nlcp = ilcp + jlcp;
+   
+   // Move one sequence position forward
+   ++iseq;
+   
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   // Loop over sequence positions
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   SeqPosLoop:
+   {
+      ++nsca;
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Update work array
+      if (iseq < lseq ) {
+      #pragma noinline
+         nextR(prf, Sequence, iseq, iop, iom, ioi, lseq, &lAlignment,&ifer, Lock[iseq], N1, N2);
+      } else {
+      #pragma noinline
+         nextR_last(prf, Sequence, iseq, iop, iom, ioi, lseq, &lAlignment,&ifer, Lock[iseq], N1, N2);      
+      }
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // If Match found
+      if (lAlignment.JALS >= kcut) {
+         // Determine firdst entry of current row
+         if ( (ifer._a > lAlignment.JAL2) || (iseq == lseq) ) {
+            // Fill in missing alignment data
+            lAlignment.JAL1 = lAlignment.JAL1 == 0 ? lAlignment.JALB : lAlignment.JAL1;
+            lAlignment.JAL2 = lAlignment.JAL2 == 0 ? iseq            : lAlignment.JAL2;
+            
+            // Check for errors
+            if (lAlignment.JAL2 < lAlignment.JAL1) {
+	      fprintf(stderr, "Error: Illegal alignment found in alignment %lu - no list produced.\n"
+	                      "       Alignement should be from %i to %i\n",1+nali, lAlignment.JAL1, lAlignment.JAL2 );
+               return -1;
+            }
+            
+            if (++nali > NALI) {
+               fputs("Warning: Too many alignments found - list may be incomplete.\n", stderr);
+               return -2;
+            } 
+            
+            // Accept alignment
+            struct Alignment * pAlignment = &alignment[nali];
+            pAlignment->JALS = lAlignment.JALS;
+            pAlignment->JALB = lAlignment.JALB;
+            pAlignment->JAL1 = lAlignment.JAL1;
+            pAlignment->JAL2 = lAlignment.JAL2;
+            pAlignment->JALE = lAlignment.JALE;
+#ifdef XALIP_DEBUG
+            printf("XALIP ALIGN %lu %4.4i %4.4i %4.4i %4.4i %4.4i\n",nali,
+                   lAlignment.JAL1, lAlignment.JAL2, lAlignment.JALS, lAlignment.JALB, lAlignment.JALE);
+#endif   
+            // Protect sequence region
+            for (int jseq=lAlignment.JAL1; jseq<=lAlignment.JAL2; ++jseq) {
+               Lock[jseq] = true;
+            } 
+            
+            // Exit if only searching for optimal alignment
+            if (nali>0 && Lopt) 
+               return nali;
+            else 
+               goto MajorLoop;
+         } else {
+            if ( ++iseq <= lseq ) goto SeqPosLoop;
+         }
+      } else {
+         // Have we reached next check point ?
+         if (iseq >= nlcp) {
+            // Determine firdst entry of current row
+            if (ifer._b >= ilcp) { 
+               ibeg = ifcp - 1;
+               ifcp = ifer._c;
+               ilcp = iseq;
+            }
+            
+            // Calculate next check point
+            nlcp += jlcp;
+         }
+         
+         // Move one sequence position forward
+         if ( ++iseq <= lseq ) goto SeqPosLoop;
+      }
+   }
+   return nali;
+}
+
diff --git a/src/C/sse2/xalit_sse2.c b/src/C/sse2/xalit_sse2.c
new file mode 100644
index 0000000..55676e0
--- /dev/null
+++ b/src/C/sse2/xalit_sse2.c
@@ -0,0 +1,628 @@
+/*******************************************************
+                        PFTOOLS
+ *******************************************************
+  Sep 26, 2011 xalit_sse2.c
+ *******************************************************
+ (C) 2011 Swiss Institute of Bioinformatics
+     Thierry Schuepbach (thierry.schuepbach at isb-sib.ch)
+ *******************************************************/
+#include <stdlib.h>
+#ifdef XALIT_DEBUG
+#  include <stdio.h>
+#endif
+
+#include "profile.h"
+#include "sse2_inline_fcts.h"
+
+#define MAX(a,b) (a>b) ? a : b
+#define MIN(a,b) (a<b) ? a : b
+
+static inline unsigned char Ncode(__m128i index)
+{
+#ifdef XALIT_DEBUG  
+   static int count = 0;
+   union lScores tmp = { xmm: index};
+   printf("NCODE  %10i %10i %10i %10i\n" , tmp.Element[MATCH],
+				       tmp.Element[INSERTION], 
+                                       tmp.Element[DELETION],
+                                       tmp.Element[DUMMY]
+                                       );
+#endif
+   const unsigned int JD = _mm_cvtsi128_si32(index); 
+   __m128i lindex = _mm_srli_si128(index, 8);
+   const unsigned int JM = _mm_cvtsi128_si32(lindex);
+   lindex = _mm_srli_si128(lindex, 4);
+   const unsigned int JI = _mm_cvtsi128_si32(lindex);
+   register const unsigned char ctmp1 = ((unsigned char) JM ) << 4;
+   register const unsigned char ctmp2 = ((unsigned char) JI ) << 2;
+   register const unsigned char ctmp3 = ((unsigned char) JD ) & 3;
+   unsigned char res = (unsigned char) (ctmp1 | ctmp2 | ctmp3);
+#ifdef XALIT_DEBUG
+   printf("XALIT CPMA %10i %8u %8u %8u\n", count++, JI, JM, JD);
+#endif
+   return res;
+}
+
+static inline void Dcode(const unsigned char Data, unsigned int * const JM,
+                         unsigned int * const JI, unsigned int * const JD)
+{
+   register const unsigned char ctmp = Data >> 2;
+   *JD = (unsigned int) (Data & 3);
+   *JI = (unsigned int) (ctmp & 3);
+   *JM = (unsigned int) ((Data >> 4) & 3);
+}
+
+static __m128i MaxP(__m128i * const Data, const __m128i Offset, 
+		    const TransitionScores * const restrict Transition)
+{
+   __m128i __KM           = _mm_shuffle_epi32(Offset, _MM_SHUFFLE(MATCH,MATCH,MATCH,MATCH));
+   __m128i __TransitionsM = _mm_loadl_epi64((__m128i*) &(Transition->From[MATCH]));
+   __TransitionsM         = _my_cvtepi16_epi32(__TransitionsM);
+#ifdef XALIT_DEBUG_PREVIOUS
+   union lScores tmp = { xmm: __TransitionsM};
+   printf("XALIT M %10i %10i %10i %10i\n", tmp.Element[MATCH], 
+                                       tmp.Element[INSERTION],
+                                       tmp.Element[DELETION],
+                                       tmp.Element[DUMMY]);
+#endif
+   __TransitionsM         = _mm_add_epi32(__TransitionsM, __KM);
+   
+   __m128i __KI           = _mm_shuffle_epi32(Offset, _MM_SHUFFLE(INSERTION,INSERTION,INSERTION,INSERTION));
+   __m128i __TransitionsI = _mm_loadl_epi64((__m128i*) &(Transition->From[INSERTION]));
+   __TransitionsI         = _my_cvtepi16_epi32(__TransitionsI);
+#ifdef XALIT_DEBUG_PREVIOUS
+   tmp.xmm = __TransitionsI;
+   printf("XALIT I %10i %10i %10i %10i\n", tmp.Element[MATCH], 
+                                       tmp.Element[INSERTION],
+                                       tmp.Element[DELETION],
+                                       tmp.Element[DUMMY]);
+#endif
+   __TransitionsI         = _mm_add_epi32(__TransitionsI, __KI);
+      
+   __m128i __KD           = _mm_shuffle_epi32(Offset, _MM_SHUFFLE(DELETION,DELETION,DELETION,DELETION));
+   __m128i __TransitionsD = _mm_loadl_epi64((__m128i*) &(Transition->From[DELETION]));
+   __TransitionsD         = _my_cvtepi16_epi32(__TransitionsD);
+#ifdef XALIT_DEBUG_PREVIOUS
+   tmp.xmm = __TransitionsD;
+   printf("XALIT D %10i %10i %10i %10i\n", tmp.Element[MATCH], 
+                                       tmp.Element[INSERTION],
+                                       tmp.Element[DELETION],
+                                       tmp.Element[DUMMY]);
+#endif
+   __TransitionsD         = _mm_add_epi32(__TransitionsD, __KD);
+
+   __m128i __TransitionsX = _mm_loadl_epi64((__m128i*) &(Transition->From[EXTRA]));
+   __TransitionsX         = _my_cvtepi16_epi32(__TransitionsX);
+   
+#ifdef XALIT_DEBUG
+#ifndef XALIT_DEBUG_PREVIOUS
+   union lScores tmp;
+#endif
+   tmp.xmm = Offset;
+   printf("XALIT KMID %10i %10i %10i %10i\n", tmp.Element[MATCH], 
+                                       tmp.Element[INSERTION],
+                                       tmp.Element[DELETION],
+                                       tmp.Element[DUMMY]);
+   tmp.xmm = __TransitionsM;
+   printf("XALIT M %10i %10i %10i %10i\n", tmp.Element[MATCH], 
+                                       tmp.Element[INSERTION],
+                                       tmp.Element[DELETION],
+                                       tmp.Element[DUMMY]);
+   tmp.xmm = __TransitionsI;
+   printf("XALIT I %10i %10i %10i %10i\n", tmp.Element[MATCH], 
+                                       tmp.Element[INSERTION],
+                                       tmp.Element[DELETION],
+                                       tmp.Element[DUMMY]);
+   tmp.xmm = __TransitionsD;
+   printf("XALIT D %10i %10i %10i %10i\n", tmp.Element[MATCH], 
+                                       tmp.Element[INSERTION],
+                                       tmp.Element[DELETION],
+                                       tmp.Element[DUMMY]);
+   tmp.xmm = __TransitionsX;
+   printf("XALIT X %10i %10i %10i %10i\n", tmp.Element[MATCH], 
+                                       tmp.Element[INSERTION],
+                                       tmp.Element[DELETION],
+                                       tmp.Element[DUMMY]);
+#endif
+   
+   __m128i __Index        = (__m128i) _mm_setzero_si128();
+   const __m128i __One    = _mm_set1_epi32(1);
+   const __m128i __Two    = _mm_add_epi32(__One, __One);
+   
+   __m128i __Mask         = _mm_cmpgt_epi32(__TransitionsI, __TransitionsX);
+   __TransitionsX         = _my_blendv_epi8(__TransitionsX, __TransitionsI, __Mask);
+   __Index                = _my_blendv_epi8(__Index, __One, __Mask);
+   
+   __Mask                 = _mm_cmpgt_epi32(__TransitionsM, __TransitionsX);
+   __TransitionsX         = _my_blendv_epi8(__TransitionsX, __TransitionsM, __Mask);
+   __Index                = _my_blendv_epi8(__Index, __Two, __Mask);
+   
+   const __m128i __Three  = _mm_add_epi32(__One, __Two);
+   __Mask                 = _mm_cmpgt_epi32(__TransitionsD, __TransitionsX);
+   __TransitionsX         = _my_blendv_epi8(__TransitionsX, __TransitionsD, __Mask);
+   __Index                = _my_blendv_epi8(__Index, __Three, __Mask);
+   
+   *Data                  = __TransitionsX;
+#ifdef XALIT_DEBUG
+   tmp.xmm = __TransitionsX; 
+   printf("XALIT MAXVAL %10i %10i %10i %10i\n", tmp.Element[MATCH], 
+                                            tmp.Element[INSERTION],
+                                            tmp.Element[DELETION],
+                                            tmp.Element[DUMMY]);
+  
+   tmp.xmm = __Index;
+   printf("XALIT INDEX %10i %10i %10i %10i\n",  tmp.Element[MATCH], 
+                                            tmp.Element[INSERTION],
+                                            tmp.Element[DELETION],
+                                            tmp.Element[DUMMY]);
+#endif
+   return __Index;
+} 
+
+static __m128i MaxP_border(__m128i * const Data, const __m128i Offset,
+          const ScoreTuple * const Border, const TransitionScores * const restrict Transition)
+{
+   __m128i __KM           = _mm_shuffle_epi32(Offset, _MM_SHUFFLE(MATCH,MATCH,MATCH,MATCH));
+   __m128i __TransitionsM = _mm_loadl_epi64((__m128i*) &(Transition->From[MATCH]));
+   __TransitionsM         = _my_cvtepi16_epi32(__TransitionsM);
+//    __TransitionsM         = _my_insert_epi32_POS1(__TransitionsM, (int) Border->To[MATCH]);
+#ifdef XALIT_DEBUG_PREVIOUS
+   union lScores tmp = { xmm: __TransitionsM};
+   printf("XALIT M BORDER %10i %10i %10i %10i\n", tmp.Element[MATCH], 
+                                       tmp.Element[INSERTION],
+                                       tmp.Element[DELETION],
+                                       tmp.Element[DUMMY]);
+#endif
+   __TransitionsM         = _mm_add_epi32(__TransitionsM, __KM);
+    
+   __m128i __KI           = _mm_shuffle_epi32(Offset, _MM_SHUFFLE(INSERTION,INSERTION,INSERTION,INSERTION));
+   __m128i __TransitionsI = _mm_loadl_epi64((__m128i*) &(Transition->From[INSERTION]));
+   __TransitionsI         = _my_cvtepi16_epi32(__TransitionsI);
+//    __TransitionsI         = _my_insert_epi32_POS1(__TransitionsI, (int) Border->To[INSERTION]);
+#ifdef XALIT_DEBUG_PREVIOUS
+   tmp.xmm = __TransitionsI;
+   printf("XALIT I BORDER %10i %10i %10i %10i\n", tmp.Element[MATCH], 
+                                       tmp.Element[INSERTION],
+                                       tmp.Element[DELETION],
+                                       tmp.Element[DUMMY]);
+#endif
+   __TransitionsI         = _mm_add_epi32(__TransitionsI, __KI);
+      
+   __m128i __KD           = _mm_shuffle_epi32(Offset, _MM_SHUFFLE(DELETION,DELETION,DELETION,DELETION));
+   __m128i __TransitionsD = _mm_loadl_epi64((__m128i*) &(Transition->From[DELETION]));
+   __TransitionsD         = _my_cvtepi16_epi32(__TransitionsD);
+//    __TransitionsD         = _my_insert_epi32_POS1(__TransitionsD, (int) Border->To[DELETION]);
+#ifdef XALIT_DEBUG_PREVIOUS
+   tmp.xmm = __TransitionsD;
+   printf("XALIT D BORDER %10i %10i %10i %10i\n", tmp.Element[MATCH], 
+                                       tmp.Element[INSERTION],
+                                       tmp.Element[DELETION],
+                                       tmp.Element[DUMMY]);
+#endif  
+   __TransitionsD         = _mm_add_epi32(__TransitionsD, __KD);
+
+//    __m128i __TransitionsX = _mm_loadl_epi64((__m128i*) &(Transition->From[EXTRA]));
+   __m128i __TransitionsX = _mm_loadl_epi64((__m128i*) &(Border->mm));
+   __TransitionsX         = _my_cvtepi16_epi32(__TransitionsX);
+   
+#ifdef XALIT_DEBUG
+#ifndef XALIT_DEBUG_PREVIOUS
+   union lScores tmp;
+#endif
+   tmp.xmm = Offset;
+   printf("XALIT KMID BORDER %10i %10i %10i %10i\n", tmp.Element[MATCH], 
+                                       tmp.Element[INSERTION],
+                                       tmp.Element[DELETION],
+                                       tmp.Element[DUMMY]);
+   tmp.xmm = __TransitionsM;
+   printf("XALIT M BORDER %10i %10i %10i %10i\n", tmp.Element[MATCH], 
+                                       tmp.Element[INSERTION],
+                                       tmp.Element[DELETION],
+                                       tmp.Element[DUMMY]);
+   tmp.xmm = __TransitionsI;
+   printf("XALIT I BORDER %10i %10i %10i %10i\n", tmp.Element[MATCH], 
+                                       tmp.Element[INSERTION],
+                                       tmp.Element[DELETION],
+                                       tmp.Element[DUMMY]);
+   tmp.xmm = __TransitionsD;
+   printf("XALIT D BORDER %10i %10i %10i %10i\n", tmp.Element[MATCH], 
+                                       tmp.Element[INSERTION],
+                                       tmp.Element[DELETION],
+                                       tmp.Element[DUMMY]);
+   tmp.xmm = __TransitionsX;
+   printf("XALIT X BORDER %10i %10i %10i %10i\n", tmp.Element[MATCH], 
+                                       tmp.Element[INSERTION],
+                                       tmp.Element[DELETION],
+                                       tmp.Element[DUMMY]);
+#endif
+   
+   __m128i __Index        = (__m128i) _mm_setzero_si128();
+   const __m128i __One    = _mm_set_epi32(1,1,1,1);
+   const __m128i __Two    = _mm_add_epi32(__One, __One);
+   
+   __m128i __Mask         = _mm_cmpgt_epi32(__TransitionsI, __TransitionsX);
+   __TransitionsX         = _my_blendv_epi8(__TransitionsX, __TransitionsI, __Mask);
+   __Index                = _my_blendv_epi8(__Index, __One, __Mask);
+   
+   __Mask                 = _mm_cmpgt_epi32(__TransitionsM, __TransitionsX);
+   __TransitionsX         = _my_blendv_epi8(__TransitionsX, __TransitionsM, __Mask);
+   __Index                = _my_blendv_epi8(__Index, __Two, __Mask);
+   
+   const __m128i __Three  = _mm_add_epi32(__One, __Two);
+   __Mask                 = _mm_cmpgt_epi32(__TransitionsD, __TransitionsX);
+   __TransitionsX         = _my_blendv_epi8(__TransitionsX, __TransitionsD, __Mask);
+   __Index                = _my_blendv_epi8(__Index, __Three, __Mask);
+   
+   *Data                  = __TransitionsX;
+
+#ifdef XALIT_DEBUG
+   tmp.xmm = __TransitionsX; 
+   printf("XALIT MAXVAL BORDER %10i %10i %10i %10i\n", tmp.Element[MATCH], 
+                                            tmp.Element[INSERTION],
+                                            tmp.Element[DELETION],
+                                            tmp.Element[DUMMY]);
+   tmp.xmm = __Index;
+   printf("XALIT INDEX BORDER %10i %10i %10i %10i\n",  tmp.Element[MATCH], 
+                                            tmp.Element[INSERTION],
+                                            tmp.Element[DELETION],
+                                            tmp.Element[DUMMY]);
+#endif
+   return __Index;
+} 
+
+// This functions fills in IPMB, IPME and CALI that are then required !
+int xalit_sse2(const struct Profile * const restrict prf, const size_t N1, const size_t N2, const size_t bseq, const size_t lseq,
+          const unsigned char * const restrict Sequence, char * const restrict CALI, union lScores * const restrict iop,
+          struct Alignment * const restrict alignment, const _Bool * const restrict Lock)
+{
+   int IPM[2];
+   unsigned int K3 = (unsigned int) prf->Length;
+   unsigned int JS = 0;
+   //////////////////////////////////////////////////////////////////////////////////////////////
+   // Prologue
+   //////////////////////////////////////////////////////////////////////////////////////////////
+   const unsigned int JALB   = alignment->JALB;
+   const unsigned int JALE   = alignment->JALE;
+   const int CutOff          = alignment->JALS;
+   
+#ifdef XALIT_DEBUG
+   fprintf(stdout,"XALIT ALIGN %i %i %i %i %i | %u %u %i %lu\n",
+                  alignment->JAL1, alignment->JAL2, alignment->JALS, 
+                  alignment->JALB, alignment->JALE, JALB, JALE, CutOff, prf->Length );
+#endif
+   
+   //////////////////////////////////////////////////////////////////////////////////////////////
+   // Allocate memory
+   const size_t Memory = (prf->Length+1) * ((size_t)(JALE-JALB+2));
+   const unsigned int prfLength = prf->Length;
+
+#ifdef XALIT_DEBUG   
+   fprintf(stdout, "XALIT Memory is %lu\n", Memory);
+#endif
+   unsigned char * const restrict cpma = (unsigned char*) malloc(Memory*sizeof(unsigned char));
+   if (cpma == NULL) {
+      fputs("Unable to allocate memory to store coding/decoding path\n", stderr);
+      return -1;
+   }
+   
+   //////////////////////////////////////////////////////////////////////////////////////////////
+   // Loop through the path
+   //////////////////////////////////////////////////////////////////////////////////////////////
+   unsigned int K1 = 0;
+   register const TransitionScores * restrict pTransitions = prf->Scores.Insertion.Transitions;
+   
+   //////////////////////////////////////////////////////////////////////////////////////////////
+   // Beginning of sequence
+   register __m128i __KMID = _mm_set1_epi32((int) NLOW);
+   register __m128i __Index;
+   register const short int * pMatch = prf->Scores.Match.Alphabet;
+   register const size_t AlignStep   = prf->Scores.Match.AlignStep;
+   
+   if (JALB == 1) {
+      const register ScoreTuple * const restrict FirstSequenceProtein = prf->Scores.Insertion.FirstSequenceProtein;
+      __Index = MaxP_border(&iop[0].xmm, __KMID, &FirstSequenceProtein[0], pTransitions); 
+                          
+      // Store temporary data packed as much as possible into one byte
+      cpma[K1] = Ncode(__Index);
+      
+      // Loop through the rest of the profile
+      for (unsigned int iprf=1; iprf<=prfLength; ++iprf) {
+        pTransitions++;
+        const int KD = iop[iprf-1].Element[DELETION] + (int) pMatch[_D];
+        pMatch += AlignStep;
+        __KMID  = _my_insert_epi32_POS0(__KMID, KD);
+        __Index = MaxP_border(&(iop[iprf].xmm), __KMID, &FirstSequenceProtein[iprf], pTransitions);
+        cpma[++K1] = Ncode(__Index);
+      }
+   } else {
+      __Index = MaxP(&(iop[0].xmm), __KMID, pTransitions);
+   
+      // Store temporary data packed as much as possible into one byte
+      cpma[K1] = Ncode(__Index);
+   
+      // Loop through the rest of the profile
+      for (unsigned int iprf=1; iprf<=prfLength; ++iprf) {
+        pTransitions++;
+        const int KD = iop[iprf-1].Element[DELETION] + (int) pMatch[_D];
+        pMatch += AlignStep;
+        __KMID = /*_mm_set_epi32(NLOW, NLOW, NLOW, KD);*/ _my_insert_epi32_POS0(__KMID, KD);
+        __Index = MaxP(&(iop[iprf].xmm), __KMID, pTransitions);
+        cpma[++K1] = Ncode(__Index);
+      }
+   }
+
+   //////////////////////////////////////////////////////////////////////////////////////////////
+   // Loop through the internal sequence indices
+   for (unsigned int iseq = JALB; iseq<JALE; ++iseq) {
+      // Protected region   
+      __KMID = _mm_set1_epi32(NLOW);
+      if (Lock[iseq]) {
+         iop[N1-1].Element[MATCH] = NLOW;
+         for ( size_t i=N1; i<N2; ++i) {
+	  // _mm_storel_pi((__m64*) &iop[i].xmm, (__m128) __KMID);
+	  iop[i].xmm = __KMID;
+	 }
+      }  
+      
+      const unsigned int SequenceIndex = Sequence[iseq-1]; // Fortran one based index
+#ifdef XALIT_DEBUG
+      fprintf(stdout, "XALIT SEQUENCE %lu LETTER %u\n",iseq, SequenceIndex);
+#endif
+      // Pointers to Score data
+      pTransitions = prf->Scores.Insertion.Transitions;
+      register const short int * restrict pInsertion = prf->Scores.Insertion.Alphabet;
+      pMatch = prf->Scores.Match.Alphabet;
+      
+      register int KOPM = iop[0].Element[MATCH];
+      register int KI   = iop[0].Element[INSERTION] + (int) pInsertion[SequenceIndex]; 
+      __KMID = _mm_set_epi32(KI,NLOW,NLOW,NLOW);
+      __Index    = MaxP(&iop[0].xmm, __KMID, pTransitions);
+      cpma[++K1] = Ncode(__Index);
+       
+      // Loop through the rest of the profile
+      for (unsigned int iprf=1; iprf<=prfLength; ++iprf) {
+        pTransitions++;
+        pInsertion   += AlignStep;
+        const int KM  = KOPM + (int) pMatch[SequenceIndex];
+//         __KMID        = _mm_insert_epi32(__KMID, KM, MATCH); 
+        KI            = iop[iprf].Element[INSERTION] + (int) pInsertion[SequenceIndex];
+//         __KMID        = _mm_insert_epi32(__KMID, KI, INSERTION); 
+        const int KD  = iop[iprf-1].Element[DELETION] + (int) pMatch[_D];
+//         __KMID        = _mm_insert_epi32(__KMID, KD, DELETION); 
+	__KMID        = _mm_set_epi32(KI,KM,NLOW,KD);
+        pMatch       += AlignStep;
+        KOPM          = iop[iprf].Element[MATCH];
+        __Index       = MaxP(&(iop[iprf].xmm), __KMID, pTransitions);
+        cpma[++K1]    = Ncode(__Index);
+      }     
+   }
+   
+   //////////////////////////////////////////////////////////////////////////////////////////////
+   // Last sequence index  
+   
+   // Protected region   
+   __KMID = _mm_set1_epi32(NLOW);
+   if (Lock[JALE]) {
+      iop[N1-1].Element[MATCH] = NLOW;
+      for ( size_t i=N1; i<N2; ++i) {
+	//_mm_storel_pi((__m64*) &iop[i].xmm, (__m128) __KMID);
+	iop[i].xmm = __KMID;
+      }
+   }
+   
+   const unsigned int SequenceIndex = Sequence[JALE-1]; // Fortran one based index
+      
+   // Pointers to Score data
+   pTransitions = prf->Scores.Insertion.Transitions;
+   register const short int * restrict pInsertion = prf->Scores.Insertion.Alphabet;
+   pMatch = prf->Scores.Match.Alphabet;
+   
+   register int KOPM = iop[0].Element[MATCH];   
+   register int KI   = iop[0].Element[INSERTION] + (int) pInsertion[SequenceIndex]; 
+   __KMID = _mm_set_epi32(KI,NLOW,NLOW,NLOW);
+   
+   // Last Sequence element or not 
+   if (JALE == lseq) {
+      const ScoreTuple * const restrict LastSequenceProtein = prf->Scores.Insertion.LastSequenceProtein;
+      __Index    = MaxP_border(&iop[0].xmm, __KMID, &LastSequenceProtein[0], pTransitions);
+      cpma[++K1] = Ncode(__Index);
+
+      // Check if first profile insertion is enough to reach cutoff
+#ifdef XALIT_DEBUG
+      fprintf(stdout,"XALIT BORDER LAST SEQ %10i %10i %10i\n",0, KI + (int) pTransitions->From[INSERTION].To[EXTRA], KOPM);
+#endif
+      if ((KI + (int) pTransitions->From[INSERTION].To[EXTRA]) >= CutOff) {
+         K3 = 0;
+         JS = 1;
+      } else {
+         // Loop through the rest of the profile
+         for (unsigned int iprf=1; iprf<=prfLength; ++iprf) {
+           pTransitions++;
+           pInsertion   += AlignStep;
+           const int KM  = KOPM + (int) pMatch[SequenceIndex];
+//            __KMID        = _mm_insert_epi32(__KMID, KM, MATCH); 
+           KI            = iop[iprf].Element[INSERTION] + (int) pInsertion[SequenceIndex];
+//            __KMID        = _mm_insert_epi32(__KMID, KM, INSERTION); 
+           const int KD  = iop[iprf-1].Element[DELETION] + (int) pMatch[_D];
+//            __KMID        = _mm_insert_epi32(__KMID, KM, DELETION);
+	   __KMID        = _mm_set_epi32(KI,KM,NLOW,KD);
+           pMatch       += AlignStep;
+           KOPM          = iop[iprf].Element[MATCH];
+//            __Index       = MaxP_border(&iop[iprf].xmm, __KMID, &LastSequenceProtein[iprf], pTransitions);
+	   __Index       = MaxP(&iop[iprf].xmm, __KMID, pTransitions);
+           cpma[++K1]    = Ncode(__Index);
+#ifdef XALIT_DEBUG
+	  fprintf(stdout,"XALIT BORDER LAST SEQ %10u %10i %10i %10i\n",iprf,
+		  KI + (int) LastSequenceProtein[iprf].To[INSERTION],
+		  KM + (int) LastSequenceProtein[iprf].To[MATCH],
+		  KD + (int) LastSequenceProtein[iprf].To[DELETION]
+ 		);
+#endif
+
+           if ((KI + (int) LastSequenceProtein[iprf].To[INSERTION]) >= CutOff) {
+               JS = 1;
+               K3 = iprf;
+               break;
+           } else if ((KM + (int) LastSequenceProtein[iprf].To[MATCH]) >= CutOff) {
+               JS = 2;
+               K3 = iprf;
+               break;
+           } else if ((KD + (int) LastSequenceProtein[iprf].To[DELETION]) >= CutOff) {
+               JS = 3;
+               K3 = iprf;
+               break;
+           }
+         }
+     }
+      
+   } else {
+      __Index    = MaxP(&iop[0].xmm, __KMID, pTransitions);
+      cpma[++K1] = Ncode(__Index);
+
+      // Check if first profile insertion is enough to reach cutoff
+#ifdef XALIT_DEBUG
+      fprintf(stdout,"XALIT LAST SEQ %10i %10i %10i\n",0, KI + (int) pTransitions->From[INSERTION].To[EXTRA],KOPM);
+#endif
+      if ((KI + (int) pTransitions->From[INSERTION].To[EXTRA]) >= CutOff) {
+         K3 = 0;
+         JS = 1;
+      } else {
+         // Loop through the rest of the profile
+         for (unsigned int iprf=1; iprf<=prfLength; ++iprf) {
+           pTransitions++;
+           pInsertion   += AlignStep;
+           const int KM  = KOPM + (int) pMatch[SequenceIndex];
+//            __KMID        = _mm_insert_epi32(__KMID, KM, MATCH); 
+           KI            = iop[iprf].Element[INSERTION] + (int) pInsertion[SequenceIndex];
+//            __KMID        = _mm_insert_epi32(__KMID, KM, INSERTION); 
+           const int KD  = iop[iprf-1].Element[DELETION] + (int) pMatch[_D];
+//            __KMID        = _mm_insert_epi32(__KMID, KM, DELETION);
+	   __KMID        = _mm_set_epi32(KI,KM,NLOW,KD);
+           pMatch       += AlignStep;
+           KOPM          = iop[iprf].Element[MATCH];
+           __Index       = MaxP(&iop[iprf].xmm, __KMID, pTransitions);
+           cpma[++K1]    = Ncode(__Index);
+#ifdef XALIT_DEBUG
+	   fprintf(stdout,"XALIT LAST SEQ %10u %10i %10i %10i\n",iprf,
+		  KI + (int) pTransitions->From[INSERTION].To[EXTRA],
+		  KM + (int) pTransitions->From[MATCH].To[EXTRA],
+		  KD + (int) pTransitions->From[DELETION].To[EXTRA]
+ 		);
+#endif
+           if ((KI + (int) pTransitions->From[INSERTION].To[EXTRA]) >= CutOff) {
+               JS = 1;
+               K3 = iprf;
+               break;
+           } else if ((KM + (int) pTransitions->From[MATCH].To[EXTRA]) >= CutOff) {
+               JS = 2;
+               K3 = iprf;
+               break;
+           } else if ((KD + (int) pTransitions->From[DELETION].To[EXTRA]) >= CutOff) {
+               JS = 3;
+               K3 = iprf;
+               break;
+           }
+         }
+      }
+   }
+   
+   //////////////////////////////////////////////////////////////////////////////////////////////
+   // Epilogue
+   //////////////////////////////////////////////////////////////////////////////////////////////
+   //Epilogue:
+ 
+   int K2          = JALE-1;
+   IPM[1]          = K3 - prf->Length - 1;
+   unsigned int J0 = 0;
+   int J1          = 0;
+   
+   //////////////////////////////////////////////////////////////////////////////////////////////
+   // Fill in unused profile indices with character '-'
+   for (unsigned int iprf = prfLength; iprf>K3; iprf--) {
+      CALI[++J1] = (unsigned char) '-';
+   }
+   
+   //////////////////////////////////////////////////////////////////////////////////////////////
+   // Continue backward analysis of profile up to JS = 0
+   const register char * const restrict CABC = prf->CABC; 
+   do {
+#ifdef XALIT_DEBUG
+      printf("XALIT BACKTRACE %10i %10i %8u %8u %10i\n", K1, K2, K3, JS, J1+1);
+#endif
+      // Beware that ordering is important here
+      if ( JS == 1 ) {
+         ///////////////////////////////////////////////
+         // Insertion treated first
+         CALI[++J1]  = (unsigned char) 32 + CABC[Sequence[K2]];
+         K1         -= (int) prfLength + 1;
+         --K2;
+      } else if ( JS == 2 ) {
+         ///////////////////////////////////////////////
+         // Match treated second
+         CALI[++J1]  = CABC[Sequence[K2]];
+         K1         -= (int) prfLength + 2;
+         --K2;
+         --K3;
+      } else if (JS == 3 ) {
+         ///////////////////////////////////////////////
+         // Deletion treated last
+         CALI[++J1] = '-';
+         --K1;
+         --K3;
+      }
+      
+      // Decode next traceback
+      unsigned int JM, JI, JD;
+      Dcode(cpma[K1], &JM, &JI, &JD);
+      
+      J0 = JS;
+      // Beware that ordering is important here
+      if ( JS == 1 ) {
+         ///////////////////////////////////////////////
+         // Insertion treated first
+        JS = JI;
+      } else if ( JS == 2) {
+         ///////////////////////////////////////////////
+         // Match treated second
+         JS = JM;
+      } else if (JS == 3 ) {
+         ///////////////////////////////////////////////
+         // Deletion treated last
+         JS = JD;
+      }
+   } while (JS > 0);
+   
+   // Free no more needed memory
+   free(cpma);
+   
+   K3 = (K3 >= prfLength) ? 0 : K3;
+  
+   for (int iprf=K3; iprf>=1; iprf--) {
+      CALI[++J1] = '-';
+   }
+   
+#ifdef XALIT_DEBUG 
+   fputs("\nXALIT SEQUENCE ", stderr);
+   for (int i=1; i<=J1; ++i) fputc(CALI[i],stderr);
+   fputs("\n", stderr);
+   fflush(stderr);
+#endif
+
+   const int LALI = J1;
+   J1 = (J1 + 1)/2;
+   for (int iprf = LALI/2+1; iprf<=LALI; ++iprf) {
+      register const char c = CALI[iprf];
+      CALI[iprf] = CALI[J1];
+      CALI[J1]   = c;
+      --J1;
+   }
+   
+   CALI[LALI+1] = '\0';
+   
+   IPM[0] = K3 + 1;
+   
+   alignment->IPMB = IPM[0];
+   alignment->IPME = IPM[1];
+
+   return 0;
+}
diff --git a/src/C/sse41/heuristic_sse41.c b/src/C/sse41/heuristic_sse41.c
new file mode 100644
index 0000000..4bbc0af
--- /dev/null
+++ b/src/C/sse41/heuristic_sse41.c
@@ -0,0 +1,427 @@
+/*******************************************************
+                        PFTOOLS
+ *******************************************************
+  Dec 1, 2011 heuristic_sse41.c
+ *******************************************************
+ (C) 2011 Swiss Institute of Bioinformatics
+     Thierry Schuepbach (thierry.schuepbach at isb-sib.ch)
+ *******************************************************/
+#include <stdlib.h>
+#include <inttypes.h>
+#include <smmintrin.h>
+#include <alloca.h>
+#include "profile.h"
+
+unsigned int TransposeHeuristic_sse41(const int * const restrict TransposeMatch, const size_t Alphabet_Length,
+                                const size_t Profile_Length, const PFSequence * const restrict Sequence)
+// WARNING: Creation of the transpose matrix took care of zeroing extra data on cache line.
+//          Remember that if you happen to change the code.
+{
+  size_t iprf;
+  // Allocate vectors on the stack ( one for read, one for write )
+  const size_t Aligned_Profile_Length = (Profile_Length+1 + 15) & ~15;
+
+  int * restrict v0 = (int *) ( ( (uintptr_t) alloca(3*Aligned_Profile_Length*sizeof(int) + 63)) & ~63);
+  int * restrict v1 = v0 + Aligned_Profile_Length;
+  int * restrict Sc = v0 + 2*Aligned_Profile_Length;
+//   int * restrict v0 = (int *) ( ( (uintptr_t) alloca(Aligned_Profile_Length*sizeof(int) + 63)) & ~63);
+//   int * restrict v1 = (int *) ( ( (uintptr_t) alloca(Aligned_Profile_Length*sizeof(int) + 63)) & ~63);
+//   int * restrict Sc = (int *) ( ( (uintptr_t) alloca(Aligned_Profile_Length*sizeof(int) + 63)) & ~63);
+  
+  register int * restrict v_w = v0;
+
+  // Initialize v with first sequence
+  register size_t Index = (size_t) Sequence->ProfileIndex[0];
+  register const int * restrict lMatch = &TransposeMatch[Aligned_Profile_Length*Index];
+
+#if 0   
+  for ( iprf=0; iprf<Profile_Length; ++iprf) {
+    v_w[iprf] = lMatch[iprf];
+    Sc[iprf]  = lMatch[iprf] > 0 ? lMatch[iprf] : 0;
+  }
+#else
+  iprf = 0;
+  do {
+    register __m128i __Zero1; //, __Zero2, __Zero3, __Zero4;
+    register __m128i __m1, __m2, __m3, __m4;
+    register __m128i __sc1, __sc2, __sc3, __sc4;
+    
+    __m1  = _mm_load_si128((__m128i*)&lMatch[iprf   ]);
+    __m2  = _mm_load_si128((__m128i*)&lMatch[iprf+ 4]);
+    __m3  = _mm_load_si128((__m128i*)&lMatch[iprf+ 8]);
+    __m4  = _mm_load_si128((__m128i*)&lMatch[iprf+12]);
+    
+    __asm__ __volatile__ ("pxor %0, %0;" : "=x"(__Zero1) );
+    __asm__ __volatile__ ("movdqa %1, %0; pmaxsd %2, %0;" : "=x"(__sc1) : "x"(__m1), "x"(__Zero1));
+    __asm__ __volatile__ ("movdqa %1, %0; pmaxsd %2, %0;" : "=x"(__sc2) : "x"(__m2), "x"(__Zero1));
+    __asm__ __volatile__ ("movdqa %1, %0; pmaxsd %2, %0;" : "=x"(__sc3) : "x"(__m3), "x"(__Zero1));
+    __asm__ __volatile__ ("movdqa %1, %0; pmaxsd %2, %0;" : "=x"(__sc4) : "x"(__m4), "x"(__Zero1));
+    
+    _mm_store_si128((__m128i*)&v_w[iprf   ], __m1);
+    _mm_store_si128((__m128i*)&v_w[iprf+4 ], __m2);
+    _mm_store_si128((__m128i*)&v_w[iprf+8 ], __m3);
+    _mm_store_si128((__m128i*)&v_w[iprf+12], __m4);
+
+    _mm_store_si128((__m128i*)&Sc[iprf   ], __sc1);
+    _mm_store_si128((__m128i*)&Sc[iprf+4 ], __sc2);
+    _mm_store_si128((__m128i*)&Sc[iprf+8 ], __sc3);
+    _mm_store_si128((__m128i*)&Sc[iprf+12], __sc4);
+    iprf += 16;
+  } while (iprf < Profile_Length);
+  
+#endif
+  // Set read v pointer
+  register const int * v_r = v0;
+  v_w = v1;
+
+  // Run through the rest of the profile
+  for (unsigned int iseq=1; iseq<(unsigned int) Sequence->Length; ++iseq) {
+    Index = (size_t) Sequence->ProfileIndex[iseq];
+    lMatch = &TransposeMatch[Aligned_Profile_Length*Index];
+    
+#if 0
+    v_w[0] = lMatch[0] > 0 ? lMatch[0] : 0;
+    if (lMatch[0] > Sc[0] ) Sc[0] = lMatch[0];
+   
+    for (size_t iprf=1; iprf<Profile_Length; ++iprf) {
+      register int tmp   = v_r[iprf-1] + lMatch[iprf];
+      tmp = tmp > 0 ? tmp : 0;
+      v_w[iprf] = tmp;
+
+      if (tmp > Sc[iprf]) Sc[iprf] = tmp;
+    }
+#else
+    register __m128i __Zero1; //, __Zero2, __Zero3, __Zero4;
+    register __m128i __V_R_1, __V_R_2, __V_R_3, __V_R_4;
+    __V_R_1 = _mm_load_si128((__m128i*) &v_r[0]);
+    __V_R_1 = _mm_slli_si128(__V_R_1, 4);
+
+    iprf=0;
+    goto Insert;
+    
+    Loop:
+    __asm__ __volatile__ (".align 16; ");
+      __V_R_1         = _mm_loadu_si128((__m128i*) &v_r[iprf-1]);
+      
+    Insert:
+    ;      
+      __V_R_2 = _mm_loadu_si128((__m128i*)&v_r[iprf-1 + 4]);
+      __V_R_3 = _mm_loadu_si128((__m128i*)&v_r[iprf-1 + 8]);
+      __V_R_4 = _mm_loadu_si128((__m128i*)&v_r[iprf-1 + 12]);
+      
+      __asm__ __volatile__ ( "pxor %0, %0;" : "=x"(__Zero1) );
+//       __asm__ __volatile__ ( "pxor %0, %0;" : "=x"(__Zero2) );
+//       __asm__ __volatile__ ( "pxor %0, %0;" : "=x"(__Zero3) );
+//       __asm__ __volatile__ ( "pxor %0, %0;" : "=x"(__Zero4) );
+      
+      __V_R_1 = _mm_add_epi32(__V_R_1, *((__m128i*)&lMatch[iprf]));
+      __V_R_2 = _mm_add_epi32(__V_R_2, *((__m128i*)&lMatch[iprf+4]));
+      __V_R_3 = _mm_add_epi32(__V_R_3, *((__m128i*)&lMatch[iprf+8]));
+      __V_R_4 = _mm_add_epi32(__V_R_4, *((__m128i*)&lMatch[iprf+12]));
+
+//       __m128i __SC_0  = _mm_load_si128((__m128i*)&Sc[iprf]);
+//       __m128i __SC_1  = _mm_load_si128((__m128i*)&Sc[iprf + 4]);
+//       __m128i __SC_2  = _mm_load_si128((__m128i*)&Sc[iprf + 8]);
+//       __m128i __SC_3  = _mm_load_si128((__m128i*)&Sc[iprf + 12]);
+      
+      __V_R_1 = _mm_max_epi32( __Zero1, __V_R_1);
+      __V_R_2 = _mm_max_epi32( __Zero1, __V_R_2);
+      __V_R_3 = _mm_max_epi32( __Zero1, __V_R_3);
+      __V_R_4 = _mm_max_epi32( __Zero1, __V_R_4);
+      
+      _mm_store_si128((__m128i*)&v_w[iprf   ], __V_R_1);
+      _mm_store_si128((__m128i*)&v_w[iprf+4 ], __V_R_2);
+      _mm_store_si128((__m128i*)&v_w[iprf+8 ], __V_R_3);
+      _mm_store_si128((__m128i*)&v_w[iprf+12], __V_R_4);
+      
+//       __SC_0 = _mm_max_epi32(__SC_0, __Zero1);
+//       __SC_1 = _mm_max_epi32(__SC_1, __Zero2);
+//       __SC_2 = _mm_max_epi32(__SC_2, __Zero3);
+//       __SC_3 = _mm_max_epi32(__SC_3, __Zero4);
+//       
+//       _mm_store_si128((__m128i*)&Sc[iprf   ], __SC_0);
+//       _mm_store_si128((__m128i*)&Sc[iprf+4 ], __SC_1);
+//       _mm_store_si128((__m128i*)&Sc[iprf+8 ], __SC_2);
+//       _mm_store_si128((__m128i*)&Sc[iprf+12], __SC_3);
+     
+      __asm__ __volatile__ (
+	    "pmaxsd   (%8,%9,4), %0;"
+	    "pmaxsd 16(%8,%9,4), %1;"
+	    "pmaxsd 32(%8,%9,4), %2;"
+	    "pmaxsd 48(%8,%9,4), %3;"
+	    : "=x"(__V_R_1), "=x"(__V_R_2), "=x"(__V_R_3), "=x"(__V_R_4)
+	    : "0"(__V_R_1), "1"(__V_R_2), "2"(__V_R_3), "3"(__V_R_4), "r"(Sc), "r"(iprf)
+      );
+//       __Zero1 = _mm_max_epi32(*((__m128i*)&Sc[iprf   ]), __Zero1);
+//       __Zero2 = _mm_max_epi32(*((__m128i*)&Sc[iprf+ 4]), __Zero2);
+//       __Zero3 = _mm_max_epi32(*((__m128i*)&Sc[iprf+ 8]), __Zero3);
+//       __Zero4 = _mm_max_epi32(*((__m128i*)&Sc[iprf+12]), __Zero4);
+      
+//       __asm__ __volatile__ ( "pxor %0, %0;" : "=x"(__V_R_1) );
+//       __asm__ __volatile__ ( "pxor %0, %0;" : "=x"(__V_R_2) );
+//       __asm__ __volatile__ ( "pxor %0, %0;" : "=x"(__V_R_3) );
+//       __asm__ __volatile__ ( "pxor %0, %0;" : "=x"(__V_R_4) );
+      
+      _mm_store_si128((__m128i*)&Sc[iprf   ], __V_R_1);
+      _mm_store_si128((__m128i*)&Sc[iprf+ 4], __V_R_2);
+      _mm_store_si128((__m128i*)&Sc[iprf+ 8], __V_R_3);
+      _mm_store_si128((__m128i*)&Sc[iprf+12], __V_R_4);
+      
+      iprf+= 16;
+    
+      if ( iprf<Profile_Length) goto Loop;
+
+#endif
+    
+    // Swap pointers
+    int * ptr = v_w;
+    v_w = (int*) v_r;
+    v_r = (const int*) ptr;
+  }
+
+  unsigned int Score = 0;
+#if 0
+  for (iprf=0; iprf<Profile_Length; ++iprf) Score += Sc[iprf];
+  return Score;
+#else
+  {
+    register __m128i __Sum, __Sum1, __Sum2, __Sum3; 
+    __asm__ __volatile__ ("pxor %0, %0;"
+			  "pxor %1, %1;"
+			  "pxor %2, %2;"
+			  "pxor %3, %3;"
+			  : "=x"(__Sum) , "=x"(__Sum1), "=x"(__Sum2), "=x"(__Sum3) );
+    iprf = 0;
+    do  {
+      __Sum  = _mm_add_epi32(__Sum,  *((__m128i*) &Sc[iprf]));
+      __Sum1 = _mm_add_epi32(__Sum1, *((__m128i*) &Sc[iprf+4]));
+      __Sum2 = _mm_add_epi32(__Sum2, *((__m128i*) &Sc[iprf+8]));
+      __Sum3 = _mm_add_epi32(__Sum3, *((__m128i*) &Sc[iprf+12]));
+      iprf+=16;
+    } while (iprf < (Profile_Length & ~0xF));
+    
+//     while ( iprf + 4 < Profile_Length & ~0x7) {
+//       __Sum  = _mm_add_epi32(__Sum,  *((__m128i*) &Sc[iprf]));
+//       iprf  += 4;
+//     }
+      
+    __Sum  = _mm_add_epi32(__Sum,  __Sum1);
+    __Sum2 = _mm_add_epi32(__Sum2, __Sum3);
+    __Sum  = _mm_add_epi32(__Sum,  __Sum2);
+           
+    __asm__ __volatile__ (
+	      "phaddd    %1, %1;" 
+	      "pshufd    $225, %1, %2;"
+	      "paddd     %2, %1 ;"
+	      "movd      %1, %0;"
+	      : "=r"(Score)
+	      : "x"(__Sum), "x"(__Sum2)
+	    );
+    
+    while ( iprf < Profile_Length ) {
+      Score += Sc[iprf];
+      ++iprf;
+    }
+    return Score;
+  }
+#endif
+}
+
+unsigned int TransposeHeuristicGivenMemory_sse41(const int * const restrict TransposeMatch, int * const Memory,
+						 const size_t Alphabet_Length, const size_t Profile_Length,
+						 const PFSequence * const restrict Sequence)
+// WARNING: Creation of the transpose matrix took care of zeroing extra data on cache line.
+//          Remember that if you happen to change the code.
+{
+  unsigned int Score = 0;
+  size_t iprf;
+  // Allocate vectors on the stack ( one for read, one for write )
+  const size_t Aligned_Profile_Length = (Profile_Length+1 + 15) & ~15;
+  int * restrict v0 = Memory;
+  int * restrict v1 = Memory + Aligned_Profile_Length;
+  int * restrict Sc = Memory + 2*Aligned_Profile_Length;
+  
+  register int * restrict v_w = v0;
+
+  // Initialize v with first sequence
+  register size_t Index = (size_t) Sequence->ProfileIndex[0];
+  register const int * restrict lMatch = &TransposeMatch[Aligned_Profile_Length*Index];
+
+#if 0   
+  for ( iprf=0; iprf<Profile_Length; ++iprf) {
+    v_w[iprf] = lMatch[iprf];
+    Sc[iprf]  = lMatch[iprf] > 0 ? lMatch[iprf] : 0;
+  }
+  for ( iprf=Profile_Length; iprf<Aligned_Profile_Length; ++iprf) {
+    Sc[iprf] = 0;
+  }
+#else
+  const register __m128i __Zero  = _mm_setzero_si128();
+  iprf = 0;
+  do {
+    __m128i __m1  = _mm_load_si128((__m128i*)&lMatch[iprf]);
+    __m128i __m2  = _mm_load_si128((__m128i*)&lMatch[iprf+4]);
+    __m128i __m3  = _mm_load_si128((__m128i*)&lMatch[iprf+8]);
+    __m128i __m4  = _mm_load_si128((__m128i*)&lMatch[iprf+12]);
+    __m128i __sc1 = _mm_max_epi32(__Zero, __m1);
+    _mm_store_si128((__m128i*)&v_w[iprf], __m1);
+    __m128i __sc2 = _mm_max_epi32(__Zero, __m2);
+    _mm_store_si128((__m128i*)&v_w[iprf+4], __m1);
+    __m128i __sc3 = _mm_max_epi32(__Zero, __m3);
+    _mm_store_si128((__m128i*)&v_w[iprf+8], __m1);
+    __m128i __sc4 = _mm_max_epi32(__Zero, __m4);
+    _mm_store_si128((__m128i*)&v_w[iprf+12], __m1);
+    _mm_store_si128((__m128i*)&Sc[iprf   ], __sc1);
+    _mm_store_si128((__m128i*)&Sc[iprf+4 ], __sc2);
+    _mm_store_si128((__m128i*)&Sc[iprf+8 ], __sc3);
+    _mm_store_si128((__m128i*)&Sc[iprf+12], __sc4);
+    iprf += 16;
+  } while (iprf < Profile_Length);
+  while (iprf < Aligned_Profile_Length) {
+    _mm_store_si128((__m128i*)&Sc[iprf   ], __Zero);
+    _mm_store_si128((__m128i*)&Sc[iprf+4 ], __Zero);
+    _mm_store_si128((__m128i*)&Sc[iprf+8 ], __Zero);
+    _mm_store_si128((__m128i*)&Sc[iprf+12], __Zero);
+    iprf += 16;
+  }
+#endif
+  // Set read v pointer
+  register const int * v_r = v0;
+  v_w = v1;
+
+  // Run through the rest of the profile
+  for (unsigned int iseq=1; iseq<(unsigned int) Sequence->Length; ++iseq) {
+    Index = (size_t) Sequence->ProfileIndex[iseq];
+    lMatch = &TransposeMatch[Aligned_Profile_Length*Index];
+    
+#if 0
+    v_w[0] = lMatch[0] > 0 ? lMatch[0] : 0;
+    if (lMatch[0] > Sc[0] ) Sc[0] = lMatch[0];
+   
+    for (size_t iprf=1; iprf<Profile_Length; ++iprf) {
+      register int tmp   = v_r[iprf-1] + lMatch[iprf];
+      tmp = tmp > 0 ? tmp : 0;
+      v_w[iprf] = tmp;
+
+      if (tmp > Sc[iprf]) Sc[iprf] = tmp;
+    }
+#else
+    
+    __m128i __V_R_0 = _mm_load_si128((__m128i*) &v_r[0]);
+    __V_R_0         = _mm_slli_si128(__V_R_0, 4); 
+
+    iprf=0;
+    goto Insert;
+    
+    Loop:
+      __V_R_0                  = _mm_loadu_si128((__m128i*) &v_r[iprf-1]);
+      
+    Insert:
+    ;
+//       const __m128i __lMatch_0 = _mm_load_si128((__m128i*)&lMatch[iprf]);
+//       __V_R_0                  = _mm_add_epi32(__V_R_0, __lMatch_0); 
+//       
+//       __m128i __V_R_1          = _mm_loadu_si128((__m128i*)&v_r[iprf-1 + 4]);
+//       const __m128i __lMatch_1 = _mm_load_si128((__m128i*)&lMatch[iprf + 4]);
+//       __V_R_1                  = _mm_add_epi32(__V_R_1, __lMatch_1);
+//       
+//       __m128i __V_R_2          = _mm_loadu_si128((__m128i*)&v_r[iprf-1 + 8]);
+//       const __m128i __lMatch_2 = _mm_load_si128((__m128i*)&lMatch[iprf + 8]);
+//       __V_R_2                  = _mm_add_epi32(__V_R_2, __lMatch_2); 
+//       
+//       __m128i __V_R_3          = _mm_loadu_si128((__m128i*)&v_r[iprf-1 + 12]);
+//       const __m128i __lMatch_3 = _mm_load_si128((__m128i*)&lMatch[iprf + 12]);
+//       __V_R_3                  = _mm_add_epi32(__V_R_3, __lMatch_3);
+
+      __V_R_0                  = _mm_add_epi32(__V_R_0, *((__m128i*)&lMatch[iprf])); 
+      
+      __m128i __V_R_1          = _mm_loadu_si128((__m128i*)&v_r[iprf-1 + 4]);
+      __V_R_1                  = _mm_add_epi32(__V_R_1, *((__m128i*)&lMatch[iprf+4]));
+      
+      __m128i __V_R_2          = _mm_loadu_si128((__m128i*)&v_r[iprf-1 + 8]);
+      __V_R_2                  = _mm_add_epi32(__V_R_2, *((__m128i*)&lMatch[iprf+8])); 
+      
+      __m128i __V_R_3          = _mm_loadu_si128((__m128i*)&v_r[iprf-1 + 12]);
+      __V_R_3                  = _mm_add_epi32(__V_R_3, *((__m128i*)&lMatch[iprf+12]));
+      
+      __m128i __SC_0           = _mm_load_si128((__m128i*)&Sc[iprf]);
+      __V_R_0                  = _mm_max_epi32( __Zero, __V_R_0);
+      
+      __m128i __SC_1           = _mm_load_si128((__m128i*)&Sc[iprf + 4]);
+      __V_R_1                  = _mm_max_epi32( __Zero, __V_R_1);
+      
+      __m128i __SC_2           = _mm_load_si128((__m128i*)&Sc[iprf + 8]);
+      __V_R_2                  = _mm_max_epi32( __Zero, __V_R_2);
+      
+      __m128i __SC_3           = _mm_load_si128((__m128i*)&Sc[iprf + 12]);
+      __V_R_3                  = _mm_max_epi32( __Zero, __V_R_3);
+      
+      _mm_store_si128((__m128i*)&v_w[iprf   ], __V_R_0);
+      _mm_store_si128((__m128i*)&v_w[iprf+4 ], __V_R_1);
+      _mm_store_si128((__m128i*)&v_w[iprf+8 ], __V_R_2);
+      _mm_store_si128((__m128i*)&v_w[iprf+12], __V_R_3);
+      
+      __SC_0 = _mm_max_epi32(__SC_0, __V_R_0);
+      __SC_1 = _mm_max_epi32(__SC_1, __V_R_1);
+      __SC_2 = _mm_max_epi32(__SC_2, __V_R_2);
+      __SC_3 = _mm_max_epi32(__SC_3, __V_R_3);
+      
+      _mm_store_si128((__m128i*)&Sc[iprf   ], __SC_0);
+      _mm_store_si128((__m128i*)&Sc[iprf+4 ], __SC_1);
+      _mm_store_si128((__m128i*)&Sc[iprf+8 ], __SC_2);
+      _mm_store_si128((__m128i*)&Sc[iprf+12], __SC_3);
+      iprf+= 16;
+    
+      if ( iprf<Profile_Length) goto Loop;
+
+#endif
+    
+    // Swap pointers
+    int * ptr = v_w;
+    v_w = (int*) v_r;
+    v_r = (const int*) ptr;
+
+    // Update Score
+    //Score += max;
+  }
+
+#if 1
+  for (iprf=0; iprf<Profile_Length; ++iprf) 
+   Score += Sc[iprf];
+#else
+   // WARNING : THERE IS AN ERROR SOMEWHERE !!!
+  iprf = 0;
+  __m128i __s1 = _mm_setzero_si128();
+  __m128i __s2 = _mm_setzero_si128();
+  __m128i __s3 = _mm_setzero_si128();
+  __m128i __s4 = _mm_setzero_si128();
+  do {
+    __m128i __sc1 = _mm_load_si128((__m128i*)&Sc[iprf   ]);
+    __m128i __sc2 = _mm_load_si128((__m128i*)&Sc[iprf+ 4]);
+    __m128i __sc3 = _mm_load_si128((__m128i*)&Sc[iprf+ 8]);
+    __m128i __sc4 = _mm_load_si128((__m128i*)&Sc[iprf+12]);
+    __s1 = _mm_add_epi32(__s1, __sc1);
+    __s2 = _mm_add_epi32(__s2, __sc2);
+    __s3 = _mm_add_epi32(__s3, __sc3);
+    __s4 = _mm_add_epi32(__s4, __sc4);
+    iprf +=16;
+  } while (iprf < Profile_Length);
+  
+  __s1 = _mm_add_epi32(__s1, __s2);
+  __s3 = _mm_add_epi32(__s3, __s4);
+  __s1 = _mm_add_epi32(__s1, __s3);
+  
+  __asm__ __volatile__ ( "pshufd    $14, %1, %2 \n\t" 
+			 "paddd     %2, %1      \n\t"
+			 "pshufd    $57, %1, %3 \n\t"
+			 "paddd     %3, %1      \n\t"
+			 "pextrd    $0, %1, %0  \n\t"
+			 : "=r"(Score)
+			 : "x"(__s1), "x"(__s2), "x"(__s3)
+	  );
+#endif
+  
+  return Score;
+  
+}
+
diff --git a/src/C/sse41/xali1_sse41.c b/src/C/sse41/xali1_sse41.c
new file mode 100644
index 0000000..986e849
--- /dev/null
+++ b/src/C/sse41/xali1_sse41.c
@@ -0,0 +1,280 @@
+/*******************************************************
+                        PFTOOLS
+ *******************************************************
+  Sep 30, 2011 xali1_sse41.c
+ *******************************************************
+ (C) 2011 Swiss Institute of Bioinformatics
+     Thierry Schuepbach (thierry.schuepbach at isb-sib.ch)
+ *******************************************************/
+
+#include <stdlib.h>
+#include <inttypes.h> 
+#include <smmintrin.h>
+#include "profile.h"
+
+#define MAX(a,b) (a>b) ? a : b
+ 
+int xali1_sse41(const struct Profile * const restrict prf, const unsigned char * const restrict Sequence,
+          int * const WORK, const size_t BSEQ, const size_t LSEQ, const int CutOff, const _Bool LOPT)
+/*
+ * WARNING: for SSE version, WORK should be 4 times the (profile size + 1)*sizeof(int) + 63 to align to cache line
+ */
+{
+  int KOPD, lScore = (int) NLOW;
+  
+  const sIOP * restrict IOP_R;
+  sIOP * restrict IOP_W = (sIOP*) WORK;
+
+  register const TransitionScores * const restrict Transitions = prf->Scores.Insertion.Transitions;
+  const short int * const restrict Match = prf->Scores.Match.Alphabet;
+  const short int * const restrict Insertion = prf->Scores.Insertion.Alphabet;
+  const size_t AlignStep = prf->Scores.Match.AlignStep;
+
+  /* NOTE: The following part could be replaced and performed only once for a profile as it
+   *       is profile dependent. Nevertheless it does a good job loading Match and Transition
+   *       matrices into the cache hierarchy.
+   */
+  {
+    register const short int * restrict lMatch = (const short int *) &Match[_D];
+    register const ScoreTuple * restrict FirstSequenceProtein = prf->Scores.Insertion.FirstSequenceProtein;
+    IOP_W[0].Element.M = (int) FirstSequenceProtein[0].To[MATCH];
+    IOP_W[0].Element.I = (int) FirstSequenceProtein[0].To[INSERTION];
+    KOPD               = (int) FirstSequenceProtein[0].To[DELETION];
+    FirstSequenceProtein++;
+    register const TransitionScores (* restrict pTransitions) = &Transitions[1];
+    register sIOP * restrict pIOP = &IOP_W[1];
+    register int Length = - (int) prf->Length;
+
+//     while (Length-- != 0) {
+    do {
+      register const int KD = KOPD + (int) *lMatch;
+      lMatch += AlignStep;
+      
+      // Transform KD into a vector
+      __m128i __KD = _mm_set1_epi32(KD);
+      // Load Transitions
+      __m128i __Transitions = _mm_loadl_epi64((__m128i*) &(pTransitions->From[DELETION].mm));
+      
+      // Convert signed WORD into signed DWORD
+      __Transitions = _mm_cvtepi16_epi32(__Transitions);
+      
+      // Add KD to Transitions
+      __Transitions = _mm_add_epi32(__Transitions, __KD);
+      
+      // Move to next profile transitions
+      pTransitions++;
+
+      // Load FirstSequenceProtein
+      __m128i __FirstSequenceProtein = _mm_loadl_epi64((__m128i*) &(FirstSequenceProtein[0].mm));
+
+      // Convert signed WORD into signed DWORD
+      __FirstSequenceProtein = _mm_cvtepi16_epi32(__FirstSequenceProtein);
+
+      // Move to next profile First Sequence
+      FirstSequenceProtein++;
+      
+      // Get maximum ( this is SSE 4.1 )
+      __m128i __max = _mm_max_epi32(__Transitions, __FirstSequenceProtein);
+
+      // Store IOPI and IOPM
+      StoreMatchInsertion( &(pIOP->mm), (__m128) __max);
+      pIOP++;
+      
+      // Set KOPD ( this is SSE 4.1 )
+      KOPD = _mm_extract_epi32(__max, DELETION);
+
+      Length++;
+    } while (Length < 0);
+  }
+
+  // Swap and assign Read and write pointers
+  IOP_R = IOP_W;
+  IOP_W = (sIOP*) (((uintptr_t) &WORK[2*(prf->Length+1)] + 63) & ~63);
+
+  for ( int iseq=BSEQ; iseq < LSEQ-1; ++iseq) {
+//     printf("%i %i\t", iseq+1, lScore);
+    register const size_t j1 = (size_t) Sequence[iseq];
+    int KOPM = IOP_R[0].Element.M;
+    register const short int * restrict lInsertion = Insertion;
+    {
+      register const int KI = IOP_R[0].Element.I + (int) lInsertion[j1];
+
+      // Transform KI into a vector
+      __m128i __KI = _mm_set1_epi32(KI);
+      // Load Transitions
+      __m128i __TransitionsI = _mm_loadl_epi64((__m128i*) &(Transitions[0].From[INSERTION].mm));
+      // Convert signed WORD into signed DWORD
+      __TransitionsI = _mm_cvtepi16_epi32(__TransitionsI);
+      // Add KI to Transition
+      __TransitionsI = _mm_add_epi32(__TransitionsI, __KI);
+
+       // Load Transitions
+      __m128i __TransitionsX = _mm_loadl_epi64((__m128i*) &(Transitions[0].From[EXTRA].mm));
+      // Convert signed WORD into signed DWORD
+      __TransitionsX = _mm_cvtepi16_epi32(__TransitionsX);
+
+      // Insert lScore into __TransitionsX
+      __TransitionsX = _mm_insert_epi32(__TransitionsX, lScore, DUMMY);
+
+      // Get maximum ( this is SSE 4.1 )
+      __m128i __max = _mm_max_epi32(__TransitionsI, __TransitionsX);
+
+      // Store IOPI and IOPM
+      StoreMatchInsertion( &(IOP_W[0].mm), (__m128) __max);
+      
+      // Store KOPD
+      KOPD = _mm_extract_epi32(__max, DELETION);
+
+      // Backup new score to xmm register
+      lScore = _mm_extract_epi32(__max, DUMMY);
+    }
+    
+    lInsertion += AlignStep;
+    register const short int * restrict lMatch = Match;
+    
+    size_t iprf = 1;
+//     for (size_t iprf=1; iprf<=prf->Length; ++iprf ) {
+    do {
+      const int KM = KOPM                  + (int) lMatch[j1];
+      const int KI = IOP_R[iprf].Element.I + (int) lInsertion[j1];
+      const int KD = KOPD                  + (int) lMatch[_D];
+#if 0
+      lMatch     += AlignStep;
+      lInsertion += AlignStep;
+
+      KOPM = IOP_R[iprf].Element.M;
+
+      // Transform KM into a vector
+      __m128i __KM = _mm_set1_epi32(KM);
+      // Load Transitions
+      register __m128i __TransitionsM = _mm_loadl_epi64((__m128i*) &(Transitions[iprf].From[MATCH].mm));
+      // Convert signed WORD into signed DWORD
+      __TransitionsM = _mm_cvtepi16_epi32(__TransitionsM);
+      // Add KM to Transition
+      __TransitionsM = _mm_add_epi32(__TransitionsM, __KM);
+
+    
+      // Transform KI into a vector
+      __m128i __KI = _mm_set1_epi32(KI);
+      // Load Transitions
+      register __m128i __TransitionsI = _mm_loadl_epi64((__m128i*) &(Transitions[iprf].From[INSERTION].mm));
+      // Convert signed WORD into signed DWORD
+      __TransitionsI = _mm_cvtepi16_epi32(__TransitionsI);
+      // Add KI to Transition
+      __TransitionsI = _mm_add_epi32(__TransitionsI, __KI);
+
+      // Get maximum ( this is SSE 4.1 )
+      __m128i __max1 = _mm_max_epi32(__TransitionsM, __TransitionsI);
+
+      // Load Transitions
+      register __m128i __TransitionsX = _mm_loadl_epi64((__m128i*) &(Transitions[iprf].From[EXTRA].mm));
+      // Convert signed WORD into signed DWORD
+      __TransitionsX = _mm_cvtepi16_epi32(__TransitionsX);
+      // Insert lscore into TransitionX
+      __TransitionsX = _mm_insert_epi32(__TransitionsX, lScore, DUMMY);
+      
+      // Transform KD into a vector
+      __m128i __KD = _mm_set1_epi32(KD);
+      // Load Transitions
+      __m128i __TransitionsD = _mm_loadl_epi64((__m128i*) &(Transitions[iprf].From[DELETION].mm));
+      // Convert signed WORD into signed DWORD
+      __TransitionsD = _mm_cvtepi16_epi32(__TransitionsD);
+      // Add KD to Transition
+      __TransitionsD = _mm_add_epi32(__TransitionsD, __KD);
+      
+      // Get maximum ( this is SSE 4.1 )
+      __m128i __max2 = _mm_max_epi32(__TransitionsD, __TransitionsX);
+      __max1 = _mm_max_epi32(__max1, __max2);
+#else
+     // Transform KM into a vector
+      const register __m128i __KM  = _mm_set1_epi32(KM);
+      const register __m128i __KI  = _mm_set1_epi32(KI);
+      const register __m128i __KD  = _mm_set1_epi32(KD);
+      
+      // Load Transitions
+      register __m128i __TransitionsM = _mm_loadl_epi64((__m128i*) &(Transitions[iprf].From[MATCH].mm));
+//       register __m128i __TransitionsI = _mm_loadl_epi64((__m128i*) &(Transitions[iprf].From[INSERTION].mm));
+      register __m128i __TransitionsD = _mm_loadl_epi64((__m128i*) &(Transitions[iprf].From[DELETION].mm));
+//       register __m128i __TransitionsX = _mm_loadl_epi64((__m128i*) &(Transitions[iprf].From[EXTRA].mm));
+      
+      // Convert signed WORD into signed DWORD
+      __TransitionsM = _mm_cvtepi16_epi32(__TransitionsM);
+      register __m128i __TransitionsI = _mm_cvtepi16_epi32(*(__m128i*) &(Transitions[iprf].From[INSERTION].mm));
+      __TransitionsD = _mm_cvtepi16_epi32(__TransitionsD);
+      register __m128i __TransitionsX = _mm_cvtepi16_epi32(*(__m128i*) &(Transitions[iprf].From[EXTRA].mm));
+      
+       // Add KM to Transition
+      __asm__ __volatile__ ("lea (%0,%2,%c3), %0\n" : "=r"(lMatch) : "0"(lMatch), "r"(AlignStep), "n"(sizeof(short int))  ); //lMatch     += AlignStep;
+      __asm__ __volatile__ ("lea (%0,%2,%c3), %0\n" : "=r"(lInsertion) : "0"(lInsertion), "r"(AlignStep), "n"(sizeof(short int))  ); //lInsertion += AlignStep;
+
+      __TransitionsM = _mm_add_epi32(__TransitionsM, __KM);
+      __TransitionsI = _mm_add_epi32(__TransitionsI, __KI);
+      __TransitionsD = _mm_add_epi32(__TransitionsD, __KD);
+      __TransitionsX = _mm_insert_epi32(__TransitionsX, lScore, DUMMY); 
+
+      // Get maximum ( this is SSE 4.1 )
+      KOPM = IOP_R[iprf].Element.M;
+      __m128i __max1 = _mm_max_epi32(__TransitionsM, __TransitionsI);
+      __m128i __max2 = _mm_max_epi32(__TransitionsD, __TransitionsX);
+      __max1 = _mm_max_epi32(__max1, __max2);
+#endif
+      // Store IOPI and IOPM
+      StoreMatchInsertion( &IOP_W[iprf].mm, (__m128) __max1);
+
+      // Set KOPD ( this is SSE 4.1 )
+      KOPD = _mm_extract_epi32(__max1, DELETION);
+
+      lScore = _mm_extract_epi32(__max1, DUMMY);
+
+//       printf("%i %i\t\t%i\t%i\t\t%i\t%i\t%i\t\t%i\t%i\t\t%i\n",
+//              iseq, iprf,
+//              IOP_W[iprf].Element.M, IOP_W[iprf].Element.I,
+//              KM, KI, KD, KOPM, KOPD,
+//              lScore);
+
+    } while (++iprf <= (size_t) prf->Length);
+
+    // Swap Read and Write pointers
+    sIOP * ptr = IOP_W;
+    IOP_W = (sIOP*) IOP_R;
+    IOP_R = ptr;
+
+    if ( ! LOPT && lScore >= CutOff) return lScore;
+  } 
+  {
+    register const short int * restrict lInsertion = Insertion;
+    const int j1 = (int) Sequence[LSEQ-1];
+    int KOPM     = IOP_R[0].Element.M;
+    int KI       = IOP_R[0].Element.I + (int) lInsertion[j1];
+    
+    KOPD   = MAX( KI + (int) Transitions[0].Element[_ID],      (int) Transitions[0].Element[_XD] );
+    register const ScoreTuple * const restrict LastSequenceProtein = prf->Scores.Insertion.LastSequenceProtein;
+    lScore = MAX( lScore, KI + (int) LastSequenceProtein[0].From[INSERTION] );
+  
+    register const short int * restrict lMatch = Match;
+    lInsertion += AlignStep;
+    
+    for (int iprf=1; iprf<=prf->Length; ++iprf) {
+      const int KM = KOPM                  + lMatch[j1];
+      KI           = IOP_R[iprf].Element.I + lInsertion[j1];
+      const int KD = KOPD                  + lMatch[_D];
+
+      lMatch     += AlignStep;
+      lInsertion += AlignStep;
+
+      KOPM = IOP_R[iprf].Element.M;
+
+      const int tIOPD1 = MAX( KM + (int) Transitions[iprf].Element[_MD],      (int) Transitions[iprf].Element[_XD] );
+      const int tIOPD2 = MAX( KI + (int) Transitions[iprf].Element[_ID], KD + (int) Transitions[iprf].Element[_DD] );
+      KOPD             = MAX( tIOPD1, tIOPD2);
+
+      const int tIOPT1 = MAX( KM + (int) LastSequenceProtein[iprf].From[MATCH], KI + (int) LastSequenceProtein[iprf].From[INSERTION] );
+      const int tIOPT2 = MAX( lScore                                          , KD + (int) LastSequenceProtein[iprf].From[DELETION] );
+      lScore           = MAX( tIOPT1, tIOPT2);
+    }
+  }
+  //printf("That one went to the end\n");
+  return lScore;
+}
+
+#undef MAX
diff --git a/src/C/sse41/xalip_sse41.c b/src/C/sse41/xalip_sse41.c
new file mode 100644
index 0000000..1e44918
--- /dev/null
+++ b/src/C/sse41/xalip_sse41.c
@@ -0,0 +1,808 @@
+/*******************************************************
+                        PFTOOLS
+ *******************************************************
+  Sep 26, 2011 xalip_sse41.c
+ *******************************************************
+ (C) 2011 Swiss Institute of Bioinformatics
+     Thierry Schuepbach (thierry.schuepbach at isb-sib.ch)
+ *******************************************************/
+#include <stdlib.h>
+#ifdef XALIP_DEBUG
+#  include <stdio.h>
+#endif
+#include <smmintrin.h>
+#include "profile.h"
+
+
+
+
+#define MAX(a,b) (a>b) ? a : b
+#define MIN(a,b) (a<b) ? a : b
+
+struct Minima {
+   int _a;
+   int _b;
+   int _c;
+};
+
+static void InitR(const int iseq, const size_t N1, const size_t N2, const size_t bseq, const size_t lseq,
+                  union lScores * const restrict iop, union Positions * const restrict iom,
+                  union Positions * const restrict ioi,  const struct Profile * const restrict prf) 
+{
+  int KOPD;
+#ifdef XALIP_DEBUG
+  fprintf(stdout,"InitR called with index %i bseq %lu\n",iseq, bseq);
+#endif
+  // Are we treating sequence index below given start?
+  register const ScoreTuple * restrict FirstSequenceProtein = ( iseq < bseq ) 
+      ? &(prf->Scores.Insertion.FirstSequenceProtein[0])
+      : &(prf->Scores.Insertion.Transitions->From[EXTRA]);
+  const size_t FirstSequenceProteinAlignStep = (iseq < bseq) ? 1 : 4;
+    
+  register __m128i * restrict pIOP = &(iop[0].xmm);
+  
+  // Load FirstSequenceProtein
+   __m128i __FirstSequenceProtein = _mm_loadl_epi64((__m128i*) FirstSequenceProtein);
+
+   // Convert signed WORD into signed DWORD
+   __FirstSequenceProtein = _mm_cvtepi16_epi32(__FirstSequenceProtein);
+   
+   // Store into iop
+   *pIOP = __FirstSequenceProtein;
+   
+   // Set KOPD ( this is SSE 4.1 )
+   KOPD = _mm_extract_epi32(__FirstSequenceProtein, DELETION);
+
+   register const TransitionScores * const restrict Transitions = prf->Scores.Insertion.Transitions;
+   register const short int * restrict pMatch       = &prf->Scores.Match.Alphabet[_D]; 
+   const size_t AlignStep = prf->Scores.Match.AlignStep;
+   
+   // Move to next profile First Sequence
+   FirstSequenceProtein += FirstSequenceProteinAlignStep;
+   pIOP++;
+   
+   for (unsigned int iprf=1; iprf<=(unsigned int) prf->Length; ++iprf) {
+      register const int KD = KOPD + (int) *pMatch;
+      pMatch += AlignStep;
+      
+      // Transform KD into a vector
+      __m128i __KD = _mm_set1_epi32(KD);
+      // Load Transitions
+      __m128i __Transitions = _mm_loadl_epi64((__m128i*) &(Transitions[iprf].From[DELETION]));    
+      // Convert signed WORD into signed DWORD
+      __Transitions = _mm_cvtepi16_epi32(__Transitions);
+      // Add KD to Transitions
+      __Transitions = _mm_add_epi32(__Transitions, __KD);
+      
+      // Load FirstSequenceProtein
+      __m128i __FirstSequenceProtein = _mm_loadl_epi64((__m128i*) FirstSequenceProtein);
+      // Convert signed WORD into signed DWORD
+      __FirstSequenceProtein = _mm_cvtepi16_epi32(__FirstSequenceProtein);
+      
+      // Move to next profile First Sequence
+      FirstSequenceProtein += FirstSequenceProteinAlignStep;
+      
+      // Get maximum ( this is SSE 4.1 )
+      __m128i __max = _mm_max_epi32(__Transitions, __FirstSequenceProtein);
+
+      // Store IOPI and IOPM
+      *pIOP = __max;
+      pIOP++;
+      
+      // Set KOPD ( this is SSE 4.1 )
+      KOPD = _mm_extract_epi32(__max, DELETION);
+    } 
+	      
+	
+   union Positions TPOS __attribute__((aligned(16)));;
+	TPOS.Element.One   = lseq + 1;
+	TPOS.Element.Two   = 0;
+	TPOS.Element.B     = iseq + 1;
+	TPOS.Element.dummy = 0;
+	
+	for (unsigned int iprf=0; iprf<(unsigned int) (N1-1); ++iprf) {
+	   _mm_store_si128(&(iom[iprf].xmm), TPOS.xmm);
+	   _mm_store_si128(&(ioi[iprf].xmm), TPOS.xmm);
+	}
+
+   if (N1 == 0) { fputs("BUG HERE N1 is NULL\n", stderr); exit(1);}
+	ioi[N1-1].xmm = TPOS.xmm; // Warning N1 > 0 ?
+	TPOS.Element.One = TPOS.Element.B;
+	TPOS.Element.Two = TPOS.Element.B;
+	iom[N1-1].xmm = TPOS.xmm;
+
+   for (unsigned int iprf=N1; iprf<(unsigned int)N2; ++iprf) {
+	   _mm_store_si128(&(iom[iprf].xmm), TPOS.xmm);
+	   _mm_store_si128(&(ioi[iprf].xmm), TPOS.xmm);
+	} 
+	 
+	TPOS.Element.One = lseq + 1;
+	TPOS.Element.Two = 0;
+	
+	 for (unsigned int iprf=(unsigned int) N2; iprf<=(unsigned int)prf->Length; ++iprf) {
+	   _mm_store_si128(&(iom[iprf].xmm), TPOS.xmm);
+	   _mm_store_si128(&(ioi[iprf].xmm), TPOS.xmm);
+	}
+}
+
+static void nextR(const struct Profile * const restrict prf, const unsigned char * const restrict Sequence,
+                  const int iseq, union lScores * const restrict iop, union Positions * const restrict iom,
+                  union Positions * const restrict ioi,const int lseq, struct Alignment * const restrict alignment,
+                  struct Minima * const restrict ifer, const _Bool Lock, const size_t N1, const size_t N2)
+{
+#ifdef XALIP_DEBUG
+   fprintf(stdout,"NextR called with iseq %i\n",iseq);
+#endif
+   // Initialization
+   const unsigned int In = iseq + 1;
+   // WARNING: Fortran uses a 1 based index for sequence
+   const unsigned int SequenceIndex = (unsigned int) Sequence[iseq-1];
+   
+   if ( iseq >= lseq) {
+      fputs("nextR_last should have been called\n", stderr);
+      exit(1);   
+   } 
+   
+   // Disable match and insert vertices of protected region
+   if (Lock) {
+      iop[N1-1].Element[MATCH] = NLOW;
+      for (size_t iprf=N1; iprf<N2; ++iprf) {
+         iop[iprf].Element[MATCH]     = NLOW;
+         iop[iprf].Element[INSERTION] = NLOW;
+      } 
+   }
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   // Profile position 0
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   
+   // Save previous match position
+   int Kopm = iop[0].Element[MATCH];
+   union Positions Kpos __attribute__((aligned(16)));
+   Kpos.xmm = iom[0].xmm;
+   
+   const union Positions TEMPpos __attribute__((aligned(16))) = { lseq+1, 0, In, 0 };
+   
+   const union Positions * restrict PTRpos[4];
+   union Positions Kiod;
+   PTRpos[0] = &TEMPpos;
+   PTRpos[1] = &Kpos;
+   PTRpos[3] = &Kiod;
+     
+   // Get pointers to score data
+   const TransitionScores * const restrict Transitions = prf->Scores.Insertion.Transitions;
+   const short int * restrict Insertion = prf->Scores.Insertion.Alphabet;
+   const size_t AlignStep = prf->Scores.Insertion.AlignStep;
+   
+   int Ki = iop[0].Element[INSERTION] + (int) Insertion[SequenceIndex];
+   
+   // Match position
+   int Ji   = Ki + (int) Transitions[0].From[INSERTION].To[MATCH];
+   int itmp = (int) Transitions[0].From[EXTRA].To[MATCH];
+   if ( Ji > itmp) {
+      iop[0].Element[MATCH] = Ji;
+      iom[0].xmm = ioi[0].xmm;
+   } else {
+      iop[0].Element[MATCH] = itmp;
+      iom[0].xmm = TEMPpos.xmm;
+   }
+   
+   // Deletion position
+   int Kopd;
+   Ji   = Ki + (int) Transitions[0].From[INSERTION].To[DELETION];
+   itmp = (int) Transitions[0].From[EXTRA].To[DELETION];
+   if ( Ji > itmp ) {
+      Kopd     = Ji;
+      Kiod.xmm = ioi[0].xmm;
+   } else {
+      Kopd     = itmp;
+      Kiod.xmm = TEMPpos.xmm; 
+   } 
+
+   // Insertion position
+   Ji   = Ki + (int) Transitions[0].From[INSERTION].To[INSERTION];
+   itmp = (int) Transitions[0].From[EXTRA].To[INSERTION];
+   if ( Ji > itmp ) {
+      iop[0].Element[INSERTION] = Ji;
+   } else {
+      iop[0].Element[INSERTION] = itmp;
+      ioi[0].xmm = TEMPpos.xmm;
+   }
+   
+   // Initialize minima
+   ifer->_a = iseq;
+   ifer->_b = iseq;
+   itmp     = MIN(ioi[0].Element.B, iom[0].Element.B);
+   ifer->_c = MIN(itmp, Kiod.Element.B); 
+   
+   // Initialize alignment
+   union Positions Fpos __attribute__((aligned(16)));;
+   Fpos.Element.One   = alignment->JAL1;
+   Fpos.Element.Two   = alignment->JAL2;
+   Fpos.Element.B     = alignment->JALB;
+   Fpos.Element.dummy = 0;
+   
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   // Loop through rest of profile
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   const short int * restrict Match = prf->Scores.Match.Alphabet;
+   Insertion += AlignStep;
+   
+   for (int iprf=1; iprf<=prf->Length; ++iprf) {
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Match
+      const register int KM = Kopm + (int) Match[SequenceIndex];
+      Kopm = iop[iprf].Element[MATCH];
+      
+      __m128i __KM = _mm_set1_epi32(KM);
+      // Load Transitions
+      __m128i __TransitionsM = _mm_loadl_epi64((__m128i*) &(Transitions[iprf].From[MATCH]));
+      // Convert signed WORD into signed DWORD
+      __TransitionsM = _mm_cvtepi16_epi32(__TransitionsM);
+      // Add KM to Transitions
+      __TransitionsM = _mm_add_epi32(__TransitionsM, __KM);
+      
+
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Insertion
+      const register int KI = iop[iprf].Element[INSERTION] + (int) Insertion[SequenceIndex]; 
+      // one could move on the seq index instead
+      
+      __m128i __KI = _mm_set1_epi32(KI);
+      // Load Transitions
+      __m128i __TransitionsI = _mm_loadl_epi64((__m128i*) &(Transitions[iprf].From[INSERTION]));
+      // Convert signed WORD into signed DWORD
+      __TransitionsI = _mm_cvtepi16_epi32(__TransitionsI);
+      // Add KM to Transitions
+      __TransitionsI = _mm_add_epi32(__TransitionsI, __KI);
+      
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Deletion
+      const register int KD = Kopd + (int) Match[_D];   
+      
+      __m128i __KD = _mm_set1_epi32(KD);
+      // Load Transitions
+      __m128i __TransitionsD = _mm_loadl_epi64((__m128i*) &(Transitions[iprf].From[DELETION]));
+      // Convert signed WORD into signed DWORD
+      __TransitionsD = _mm_cvtepi16_epi32(__TransitionsD);
+      // Add KM to Transitions
+      __TransitionsD = _mm_add_epi32(__TransitionsD, __KD);
+      
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Extensions
+      // Load Transitions
+      __m128i __TransitionsX = _mm_loadl_epi64((__m128i*) &(Transitions[iprf].From[EXTRA]));
+      // Convert signed WORD into signed DWORD
+      __TransitionsX = _mm_cvtepi16_epi32(__TransitionsX);
+      
+      // Insert NLOW into Extension vector -> done in io.c
+      //__TransitionsX = _mm_insert_epi32(__TransitionsX, NLOW, DUMMY);
+      
+      // Move to next profile index
+      Match     += AlignStep;
+      Insertion += AlignStep;
+
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Compute Maxima (Fortran Nstep function)
+      __m128i __Index = (__m128i) _mm_setzero_si128();
+      __m128i __three = _mm_set_epi32(3,3,3,3);
+      
+      __m128i  __Mask = _mm_cmpgt_epi32(__TransitionsD, __TransitionsX);
+      __TransitionsX  = _mm_blendv_epi8(__TransitionsX, __TransitionsD, __Mask);
+      __Index         = _mm_blendv_epi8(__Index, __three, __Mask);
+      
+      __m128i __One  = _mm_set_epi32(1,1,1,1);
+      __Mask         = _mm_cmpgt_epi32(__TransitionsM, __TransitionsX);
+      __TransitionsX = _mm_blendv_epi8(__TransitionsX, __TransitionsM, __Mask);
+      __Index        = _mm_blendv_epi8(__Index, __One, __Mask);
+      
+      __m128i __Two  = _mm_add_epi32(__One, __One);
+      __Mask         = _mm_cmpgt_epi32(__TransitionsI, __TransitionsX);
+      __TransitionsX = _mm_blendv_epi8(__TransitionsX, __TransitionsI, __Mask);
+      __Index        = _mm_blendv_epi8(__Index, __Two, __Mask);
+      
+      // Set new data
+      iop[iprf].xmm = __TransitionsX;
+      //StoreMatchInsertion((__m64*) &iop[iprf],(__m128) __TransitionsX);
+      Kopd = _mm_extract_epi32(__TransitionsX, DELETION);
+
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Check for new maxima
+      const int KE = _mm_extract_epi32(__TransitionsX, DUMMY);
+      if (KE > alignment->JALS) {
+         alignment->JALS = KE;
+         alignment->JALE = iseq;
+         Fpos.xmm = ioi[iprf].xmm;
+         const unsigned int Id = (unsigned int) _mm_extract_epi32(__Index, DUMMY);
+         if (Id == 1)  { // KM is max
+               Fpos.xmm = Kpos.xmm;
+         } else if (Id == 3) { // KD is max
+               Fpos.xmm = Kiod.xmm;
+         }
+      }
+#ifdef XALIP_DEBUG
+      printf("FPOS %8i %8i %8i\n", Fpos.Element.One, Fpos.Element.Two, Fpos.Element.B);
+#endif
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Update alignment positions
+      union Positions Jpos __attribute__((aligned(16)));
+      Jpos.xmm  = iom[iprf].xmm;
+      PTRpos[2] = &ioi[iprf];
+      
+      const int NewM = _mm_extract_epi32(__Index, MATCH);
+      iom[iprf].xmm  = PTRpos[NewM]->xmm;
+      
+      const int NewD = _mm_extract_epi32(__Index, DELETION);
+      Kiod.xmm       = PTRpos[NewD]->xmm;
+      
+      const int NewI = _mm_extract_epi32(__Index, INSERTION);
+      ioi[iprf].xmm  = PTRpos[NewI]->xmm;
+      
+      Kpos.xmm = Jpos.xmm;
+      
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Update minima
+      
+      const int t1 = MIN(ioi[iprf].Element.One, iom[iprf].Element.One);
+      const int t2 = MIN(t1, Kiod.Element.One);
+      ifer->_a     = MIN(ifer->_a, t2);
+      
+      if (iprf > N1) {
+         ifer->_b = MIN(ifer->_b, t2);   
+      }
+      const int t3 = MIN(ioi[iprf].Element.B, iom[iprf].Element.B);
+      const int t4 = MIN(t3, Kiod.Element.B);
+      ifer->_c     = MIN(ifer->_c, t4);  
+   }
+   
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   // Epilogue
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   
+   // Finish updating alignment positions
+   alignment->JAL1 = Fpos.Element.One;
+   alignment->JAL2 = Fpos.Element.Two;
+   alignment->JALB = Fpos.Element.B;
+   
+   // Entry and exit from protected regions
+   iom[N1-1].Element.One = MIN(iom[N1-1].Element.One, In);
+   iom[N1-1].Element.Two = In;
+   
+   for (int iprf=N1; iprf<N2; ++iprf) {
+      iom[iprf].Element.One = MIN(iom[iprf].Element.One, In);
+      iom[iprf].Element.Two = In;
+   
+      ioi[iprf].Element.One = MIN(ioi[iprf].Element.One, In);
+      ioi[iprf].Element.Two = In;
+   }  
+   
+#ifdef XALIP_DEBUG
+   for (int iprf=0; iprf<=prf->Length; ++iprf) {
+      printf("NEXTR IOP %4.4i %15i %15i %15i\n", iprf, iop[iprf].Element[MATCH], iop[iprf].Element[INSERTION],
+             iop[iprf].Element[DELETION]);
+      printf("NEXTR IOM %4.4i %15i %15i %15i\n", iprf, iom[iprf].Element.One, iom[iprf].Element.Two,
+             iom[iprf].Element.B);
+      printf("NEXTR IOI %4.4i %15i %15i %15i\n", iprf, ioi[iprf].Element.One, ioi[iprf].Element.Two,
+             ioi[iprf].Element.B);
+      
+   }
+   
+   printf("NEXTR ALIGN %4i %4i %4i %4i %4i\n",
+                   alignment->JAL1, alignment->JAL2, alignment->JALS, alignment->JALB, alignment->JALE); 
+#endif
+}
+
+static void nextR_last(const struct Profile * const restrict prf, const unsigned char * const restrict Sequence,
+                       const int iseq, union lScores * const restrict iop, union Positions * const restrict iom,
+                       union Positions * const restrict ioi,const int lseq, struct Alignment * const restrict alignment,
+                       struct Minima * const restrict ifer, const _Bool Lock, const size_t N1, const size_t N2)
+{
+#ifdef XALIP_DEBUG
+   fprintf(stdout,"NextR_last called with iseq %i\n",iseq);
+#endif
+   // Initialization
+   const unsigned int In = iseq + 1;
+   // WARNING: Fortran uses a 1 based index for sequence
+   const unsigned int SequenceIndex = (unsigned int) Sequence[iseq-1];
+   
+   if ( iseq < lseq) {
+      fputs("nextR should have been called\n", stderr);
+      exit(1);   
+   } 
+   
+   // Disable match and insert vertices of protected region
+   if (Lock) {
+      iop[N1-1].Element[MATCH] = NLOW;
+      for (int iprf=N1; iprf<N2; ++iprf) {
+         iop[iprf].Element[MATCH]     = NLOW;
+         iop[iprf].Element[INSERTION] = NLOW;
+      } 
+   }
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   // Profile position 0
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   
+   // Save previous match position
+   int Kopm = iop[0].Element[MATCH];
+   union Positions Kpos __attribute__((aligned(16)));
+   Kpos.xmm = iom[0].xmm;
+   
+   const union Positions TEMPpos __attribute__((aligned(16))) = { lseq+1, 0, In, 0 };
+   
+   const union Positions * restrict PTRpos[4];
+   union Positions Kiod;
+   PTRpos[0] = &TEMPpos;
+   PTRpos[1] = &Kpos;
+   PTRpos[3] = &Kiod;
+     
+   // Get pointers to score data
+   const TransitionScores * const restrict Transitions = prf->Scores.Insertion.Transitions;
+   const short int * restrict Insertion = prf->Scores.Insertion.Alphabet;
+   const size_t AlignStep = prf->Scores.Insertion.AlignStep;
+   
+   int Ki = iop[0].Element[INSERTION] + (int) Insertion[SequenceIndex];
+   
+   // Match position
+   int Ji   = Ki + (int) Transitions[0].From[INSERTION].To[MATCH];
+   int itmp = (int) Transitions[0].From[EXTRA].To[MATCH];
+   if ( Ji > itmp) {
+      iop[0].Element[MATCH] = Ji;
+      iom[0].xmm = ioi[0].xmm;
+   } else {
+      iop[0].Element[MATCH] = itmp;
+      iom[0].xmm = TEMPpos.xmm;
+   }
+   
+   // Deletion position
+   int Kopd;
+   Ji   = Ki + (int) Transitions[0].From[INSERTION].To[DELETION];
+   itmp = (int) Transitions[0].From[EXTRA].To[DELETION];
+   if ( Ji > itmp ) {
+      Kopd     = Ji;
+      Kiod.xmm = ioi[0].xmm;
+   } else {
+      Kopd     = itmp;
+      Kiod.xmm = TEMPpos.xmm; 
+   } 
+
+   // Insertion position
+   Ji   = Ki + (int) Transitions[0].From[INSERTION].To[INSERTION];
+   itmp = (int) Transitions[0].From[EXTRA].To[INSERTION];
+   if ( Ji > itmp ) {
+      iop[0].Element[INSERTION] = Ji;
+   } else {
+      iop[0].Element[INSERTION] = itmp;
+      ioi[0].xmm = TEMPpos.xmm;
+   }
+   
+   // Initialize minima
+   ifer->_a = iseq;
+   ifer->_b = iseq;
+   itmp     = MIN(ioi[0].Element.B, iom[0].Element.B);
+   ifer->_c = MIN(itmp, Kiod.Element.B); 
+   
+   // Initialize alignment
+   union Positions Fpos __attribute__((aligned(16)));
+   Fpos.Element.One   = alignment->JAL1;
+   Fpos.Element.Two   = alignment->JAL2;
+   Fpos.Element.B     = alignment->JALB;
+   Fpos.Element.dummy = 0;
+   
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   // Loop through rest of profile
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   const short int * restrict Match = prf->Scores.Match.Alphabet;
+   const ScoreTuple * const restrict LastProteinSequence = prf->Scores.Insertion.LastSequenceProtein;
+   Insertion += AlignStep;
+   
+   for (int iprf=1; iprf<=prf->Length; ++iprf) {
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Match
+      const register int KM = Kopm + (int) Match[SequenceIndex];
+      Kopm = iop[iprf].Element[MATCH];
+      
+      __m128i __KM = _mm_set1_epi32(KM);
+      // Load Transitions
+      __m128i __TransitionsM = _mm_loadl_epi64((__m128i*) &(Transitions[iprf].From[MATCH]));
+      // Convert signed WORD into signed DWORD
+      __TransitionsM = _mm_cvtepi16_epi32(__TransitionsM);
+      // Insert LastProteinSequence
+      __TransitionsM = _mm_insert_epi32(__TransitionsM, (int) LastProteinSequence[iprf].From[MATCH], DUMMY);
+      // Add KM to Transitions
+      __TransitionsM = _mm_add_epi32(__TransitionsM, __KM);
+      
+
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Insertion
+      const register int KI = iop[iprf].Element[INSERTION] + (int) Insertion[SequenceIndex]; 
+      // one could move on the seq index instead
+      
+      __m128i __KI = _mm_set1_epi32(KI);
+      // Load Transitions
+      __m128i __TransitionsI = _mm_loadl_epi64((__m128i*) &(Transitions[iprf].From[INSERTION]));
+      // Convert signed WORD into signed DWORD
+      __TransitionsI = _mm_cvtepi16_epi32(__TransitionsI);
+      // Insert LastProteinSequence
+      __TransitionsI = _mm_insert_epi32(__TransitionsI, (int) LastProteinSequence[iprf].From[INSERTION], DUMMY);
+      // Add KM to Transitions
+      __TransitionsI = _mm_add_epi32(__TransitionsI, __KI);
+      
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Deletion
+      const register int KD = Kopd + (int) Match[_D];   
+      
+      __m128i __KD = _mm_set1_epi32(KD);
+      // Load Transitions
+      __m128i __TransitionsD = _mm_loadl_epi64((__m128i*) &(Transitions[iprf].From[DELETION]));
+      // Convert signed WORD into signed DWORD
+      __TransitionsD = _mm_cvtepi16_epi32(__TransitionsD);
+      // Insert LastProteinSequence
+      __TransitionsD = _mm_insert_epi32(__TransitionsD, (int) LastProteinSequence[iprf].From[DELETION], DUMMY);
+      // Add KM to Transitions
+      __TransitionsD = _mm_add_epi32(__TransitionsD, __KD);
+      
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Extensions
+      // Load Transitions
+      __m128i __TransitionsX = _mm_loadl_epi64((__m128i*) &(Transitions[iprf].From[EXTRA]));
+      // Convert signed WORD into signed DWORD
+      __TransitionsX = _mm_cvtepi16_epi32(__TransitionsX);
+      
+      // Insert NLOW into Extension vector -> done in io.c
+      //__TransitionsX = _mm_insert_epi32(__TransitionsX, NLOW, DUMMY);
+      
+      // Move to next profile index
+      Match     += AlignStep;
+      Insertion += AlignStep;
+
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Compute Maxima (Fortran Nstep function)
+      __m128i __Index = (__m128i) _mm_setzero_ps();
+      __m128i __three = _mm_set_epi32(3,3,3,3);
+      
+      __m128i  __Mask = _mm_cmpgt_epi32(__TransitionsD, __TransitionsX);
+      __TransitionsX  = _mm_blendv_epi8(__TransitionsX, __TransitionsD, __Mask);
+      __Index         = _mm_blendv_epi8(__Index, __three, __Mask);
+      
+      __m128i __One  = _mm_set_epi32(1,1,1,1);
+      __Mask         = _mm_cmpgt_epi32(__TransitionsM, __TransitionsX);
+      __TransitionsX = _mm_blendv_epi8(__TransitionsX, __TransitionsM, __Mask);
+      __Index        = _mm_blendv_epi8(__Index, __One, __Mask);
+      
+      __m128i __Two  = _mm_add_epi32(__One, __One);
+      __Mask         = _mm_cmpgt_epi32(__TransitionsI, __TransitionsX);
+      __TransitionsX = _mm_blendv_epi8(__TransitionsX, __TransitionsI, __Mask);
+      __Index        = _mm_blendv_epi8(__Index, __Two, __Mask);
+      
+      // Set new data
+      iop[iprf].xmm = __TransitionsX;
+      //_mm_storel_pi((__m64*) &iop[iprf],(__m128) __TransitionsX);
+      Kopd = _mm_extract_epi32(__TransitionsX, DELETION);
+      
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Check for new maxima
+      const int KE = _mm_extract_epi32(__TransitionsX, DUMMY);
+      if (KE > alignment->JALS) {
+         alignment->JALS = KE;
+         alignment->JALE = iseq;
+         Fpos.xmm = ioi[iprf].xmm;
+         const unsigned int Id = (unsigned int) _mm_extract_epi32(__Index, DUMMY);
+         if (Id == 1)  { // KM is max
+               Fpos.xmm = Kpos.xmm;
+         } else if (Id == 3) { // KD is max
+               Fpos.xmm = Kiod.xmm;
+         }
+      }
+#ifdef XALIP_DEBUG
+      printf("FPOS %8i %8i %8i\n", Fpos.Element.One, Fpos.Element.Two, Fpos.Element.B);
+#endif
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Update alignment positions
+      union Positions Jpos __attribute__((aligned(16))); 
+      Jpos.xmm  = iom[iprf].xmm;
+      PTRpos[2] = &ioi[iprf];
+      
+      const int NewM = _mm_extract_epi32(__Index, MATCH);
+      iom[iprf].xmm  = PTRpos[NewM]->xmm;
+      
+      const int NewD = _mm_extract_epi32(__Index, DELETION);
+      Kiod.xmm       = PTRpos[NewD]->xmm;
+      
+      const int NewI = _mm_extract_epi32(__Index, INSERTION);
+      ioi[iprf].xmm  = PTRpos[NewI]->xmm;
+      
+      Kpos.xmm = Jpos.xmm;
+      
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Update minima
+      
+      const int t1 = MIN(ioi[iprf].Element.One, iom[iprf].Element.One);
+      const int t2 = MIN(t1, Kiod.Element.One);
+      ifer->_a     = MIN(ifer->_a, t2);
+      
+      if (iprf > N1) {
+         ifer->_b = MIN(ifer->_b, t2);   
+      }
+      const int t3 = MIN(ioi[iprf].Element.B, iom[iprf].Element.B);
+      const int t4 = MIN(t3, Kiod.Element.B);
+      ifer->_c     = MIN(ifer->_c, t4);  
+   }
+   
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   // Epilogue
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   
+   // Finish updating alignment positions
+   alignment->JAL1 = Fpos.Element.One;
+   alignment->JAL2 = Fpos.Element.Two;
+   alignment->JALB = Fpos.Element.B;
+   
+   // Entry and exit from protected regions
+   iom[N1-1].Element.One = MIN(iom[N1-1].Element.One, In);
+   iom[N1-1].Element.Two = In;
+   
+   for (int iprf=N1; iprf<N2; ++iprf) {
+      iom[iprf].Element.One = MIN(iom[iprf].Element.One, In);
+      iom[iprf].Element.Two = In;
+   
+      ioi[iprf].Element.One = MIN(ioi[iprf].Element.One, In);
+      ioi[iprf].Element.Two = In;
+   }  
+   
+#ifdef XALIP_DEBUG
+   for (int iprf=0; iprf<=prf->Length; ++iprf) {
+      printf("NEXTR IOP %4.4i %15i %15i %15i\n", iprf, iop[iprf].Element[MATCH], iop[iprf].Element[INSERTION],
+             iop[iprf].Element[DELETION]);
+      printf("NEXTR IOM %4.4i %15i %15i %15i\n", iprf, iom[iprf].Element.One, iom[iprf].Element.Two,
+             iom[iprf].Element.B);
+      printf("NEXTR IOI %4.4i %15i %15i %15i\n", iprf, ioi[iprf].Element.One, ioi[iprf].Element.Two,
+             ioi[iprf].Element.B);
+      
+   }
+   
+   printf("NEXTR ALIGN %4i %4i %4i %4i %4i\n",
+                   alignment->JAL1, alignment->JAL2, alignment->JALS, alignment->JALB, alignment->JALE);
+#endif
+}
+
+int xalip_sse41( const struct Profile * const restrict prf, const unsigned char * const restrict Sequence,
+           union lScores * const restrict iop, union Positions * const restrict iom,
+           union Positions * const restrict ioi, const size_t bseq, const size_t lseq,
+           struct Alignment * const restrict alignment,
+           _Bool * const restrict Lock, const size_t N1, const size_t N2, const _Bool Lopt,
+           const int kcut, const size_t NALI)
+{
+   int iseq;
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   // Prelogue
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   
+   // Alignment list
+   int iopt = NLOW;
+   size_t nali = 0;
+   
+   // Search control fields
+   int ibeg    = bseq-1;
+   size_t jlcp = prf->Length / 2;
+   int nsca    = 0;
+   
+   // Stack Memory
+   struct Minima ifer __attribute__((aligned(16)));
+   
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   // Two step forward one step backward loop
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   MajorLoop:
+   
+   iseq = ibeg;
+   struct Alignment lAlignment;
+   lAlignment.JALS = NLOW;
+   lAlignment.JAL1 = 0;
+   lAlignment.JAL2 = 0;
+   lAlignment.JALB = 0;
+   lAlignment.JALE = 0;
+   
+   // Initiate work array
+   InitR(iseq, N1, N2, bseq, lseq, iop, iom, ioi, prf);
+#ifdef XALIP_DEBUG
+   for (size_t i=0; i<=prf->Length; ++i) {
+      printf("IOP %8i %8i %8i %8i\n",
+             iop[i].Element[MATCH], iop[i].Element[INSERTION], iop[i].Element[DELETION],
+             iop[i].Element[DUMMY]);
+      printf("IOM %8i %8i %8i %8i\n",
+             iom[i].Element.One, iom[i].Element.Two, iom[i].Element.B,
+             iom[i].Element.dummy);
+      printf("IOI %8i %8i %8i %8i\n",
+             ioi[i].Element.One, ioi[i].Element.Two, ioi[i].Element.B,
+             ioi[i].Element.dummy);          
+   }
+#endif
+   
+   // Initiate search control values
+   int ilcp = iseq;
+   int ifcp = iseq+1;
+   int nlcp = ilcp + jlcp;
+   
+   // Move one sequence position forward
+   ++iseq;
+   
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   // Loop over sequence positions
+   ////////////////////////////////////////////////////////////////////////////////////////////
+   SeqPosLoop:
+   {
+      ++nsca;
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // Update work array
+      if (iseq < lseq ) {
+      #pragma noinline
+         nextR(prf, Sequence, iseq, iop, iom, ioi, lseq, &lAlignment,&ifer, Lock[iseq], N1, N2);
+      } else {
+      #pragma noinline
+         nextR_last(prf, Sequence, iseq, iop, iom, ioi, lseq, &lAlignment,&ifer, Lock[iseq], N1, N2);      
+      }
+      /////////////////////////////////////////////////////////////////////////////////////////
+      // If Match found
+      if (lAlignment.JALS >= kcut) {
+         // Determine firdst entry of current row
+         if ( (ifer._a > lAlignment.JAL2) || (iseq == lseq) ) {
+            // Fill in missing alignment data
+            lAlignment.JAL1 = lAlignment.JAL1 == 0 ? lAlignment.JALB : lAlignment.JAL1;
+            lAlignment.JAL2 = lAlignment.JAL2 == 0 ? iseq            : lAlignment.JAL2;
+            
+            // Check for errors
+            if (lAlignment.JAL2 < lAlignment.JAL1) {
+               fprintf(stderr, "Error: Illegal alignment found in alignment %lu - no list produced.\n"
+	                       "       Alignement should be from %i to %i\n",1+nali, lAlignment.JAL1, lAlignment.JAL2 );
+               return -1;
+            }
+            
+            if (++nali > NALI) {
+               fputs("Warning: Too many alignments found - list may be incomplete.\n", stderr);
+               return -2;
+            } 
+            
+            // Accept alignment
+            struct Alignment * pAlignment = &alignment[nali];
+            pAlignment->JALS = lAlignment.JALS;
+            pAlignment->JALB = lAlignment.JALB;
+            pAlignment->JAL1 = lAlignment.JAL1;
+            pAlignment->JAL2 = lAlignment.JAL2;
+            pAlignment->JALE = lAlignment.JALE;
+#ifdef XALIP_DEBUG
+            printf("XALIP ALIGN %lu %4.4i %4.4i %4.4i %4.4i %4.4i\n",nali,
+                   lAlignment.JAL1, lAlignment.JAL2, lAlignment.JALS, lAlignment.JALB, lAlignment.JALE);
+#endif   
+            // Protect sequence region
+            for (int jseq=lAlignment.JAL1; jseq<=lAlignment.JAL2; ++jseq) {
+               Lock[jseq] = true;
+            } 
+            
+            // Exit if only searching for optimal alignment
+            if (nali>0 && Lopt) 
+               return nali;
+            else 
+               goto MajorLoop;
+         } else {
+            if ( ++iseq <= lseq ) goto SeqPosLoop;
+         }
+      } else {
+         // Have we reached next check point ?
+         if (iseq >= nlcp) {
+            // Determine firdst entry of current row
+            if (ifer._b >= ilcp) { 
+               ibeg = ifcp - 1;
+               ifcp = ifer._c;
+               ilcp = iseq;
+            }
+            
+            // Calculate next check point
+            nlcp += jlcp;
+         }
+         
+         // Move one sequence position forward
+         if ( ++iseq <= lseq ) goto SeqPosLoop;
+      }
+   }
+   return nali;
+}
+
diff --git a/src/C/sse41/xalit_sse41.c b/src/C/sse41/xalit_sse41.c
new file mode 100644
index 0000000..f85f431
--- /dev/null
+++ b/src/C/sse41/xalit_sse41.c
@@ -0,0 +1,567 @@
+/*******************************************************
+                        PFTOOLS
+ *******************************************************
+  Sep 26, 2011 xalit_sse41.c
+ *******************************************************
+ (C) 2011 Swiss Institute of Bioinformatics
+     Thierry Schuepbach (thierry.schuepbach at isb-sib.ch)
+ *******************************************************/
+#include <stdlib.h>
+#ifdef XALIT_DEBUG
+#  include <stdio.h>
+#endif
+#include <smmintrin.h>
+#include "profile.h"
+
+
+#define MAX(a,b) (a>b) ? a : b
+#define MIN(a,b) (a<b) ? a : b
+
+static inline unsigned char Ncode(__m128i index)
+{
+#ifdef XALIT_DEBUG
+   static int count = 0;
+   printf("NCODE %10i %10i %10i %10i\n", _mm_extract_epi32(index, MATCH), 
+				     _mm_extract_epi32(index, INSERTION),
+				     _mm_extract_epi32(index, DELETION),
+				     _mm_extract_epi32(index, DUMMY));
+#endif
+   const unsigned int JM = _mm_extract_epi32(index,MATCH);
+   const unsigned int JI = _mm_extract_epi32(index,INSERTION);
+   const unsigned int JD = _mm_extract_epi32(index,DELETION);
+   register const unsigned char ctmp1 = ((unsigned char) JM ) << 4;
+   register const unsigned char ctmp2 = ((unsigned char) JI ) << 2;
+   register const unsigned char ctmp3 = ((unsigned char) JD ) & 3;
+   unsigned char res = (unsigned char) (ctmp1 | ctmp2 | ctmp3);
+#ifdef XALIT_DEBUG
+   printf("XALIT CPMA %10i %8u %8u %8u\n", count++, JI, JM, JD);
+#endif
+   return res;
+}
+
+static inline void Dcode(const unsigned char Data, unsigned int * const JM,
+                         unsigned int * const JI, unsigned int * const JD)
+{
+   register const unsigned char ctmp = Data >> 2;
+   *JD = (unsigned int) (Data & 3);
+   *JI = (unsigned int) (ctmp & 3);
+   *JM = (unsigned int) ((Data >> 4) & 3);
+}
+
+static __m128i MaxP(__m128i * const Data, const __m128i Offset, 
+		    const TransitionScores * const restrict Transition)
+{
+   __m128i __KM           = _mm_shuffle_epi32(Offset, _MM_SHUFFLE(MATCH,MATCH,MATCH,MATCH));
+   __m128i __TransitionsM = _mm_loadl_epi64((__m128i*) &(Transition->From[MATCH]));
+   __TransitionsM         = _mm_cvtepi16_epi32(__TransitionsM);
+   __TransitionsM         = _mm_add_epi32(__TransitionsM, __KM);
+   
+   __m128i __KI           = _mm_shuffle_epi32(Offset, _MM_SHUFFLE(INSERTION,INSERTION,INSERTION,INSERTION));
+   __m128i __TransitionsI = _mm_loadl_epi64((__m128i*) &(Transition->From[INSERTION]));
+   __TransitionsI         = _mm_cvtepi16_epi32(__TransitionsI);
+   __TransitionsI         = _mm_add_epi32(__TransitionsI, __KI);
+      
+   __m128i __KD           = _mm_shuffle_epi32(Offset, _MM_SHUFFLE(DELETION,DELETION,DELETION,DELETION));
+   __m128i __TransitionsD = _mm_loadl_epi64((__m128i*) &(Transition->From[DELETION]));
+   __TransitionsD         = _mm_cvtepi16_epi32(__TransitionsD);
+   __TransitionsD         = _mm_add_epi32(__TransitionsD, __KD);
+
+   __m128i __TransitionsX = _mm_loadl_epi64((__m128i*) &(Transition->From[EXTRA]));
+   __TransitionsX         = _mm_cvtepi16_epi32(__TransitionsX);
+   
+#ifdef XALIT_DEBUG
+   printf("XALIT KMID %10i %10i %10i %10i\n", _mm_extract_epi32(Offset, MATCH), 
+                                          _mm_extract_epi32(Offset, INSERTION),
+                                          _mm_extract_epi32(Offset, DELETION),
+                                          _mm_extract_epi32(Offset, DUMMY));
+   printf("XALIT M %10i %10i %10i %10i\n", _mm_extract_epi32(__TransitionsM, MATCH), 
+                                       _mm_extract_epi32(__TransitionsM, INSERTION),
+                                       _mm_extract_epi32(__TransitionsM, DELETION),
+                                       _mm_extract_epi32(__TransitionsM, DUMMY));
+   printf("XALIT I %10i %10i %10i %10i\n", _mm_extract_epi32(__TransitionsI, MATCH), 
+                                       _mm_extract_epi32(__TransitionsI, INSERTION),
+                                       _mm_extract_epi32(__TransitionsI, DELETION),
+                                       _mm_extract_epi32(__TransitionsI, DUMMY));
+   printf("XALIT D %10i %10i %10i %10i\n", _mm_extract_epi32(__TransitionsD, MATCH), 
+                                       _mm_extract_epi32(__TransitionsD, INSERTION),
+                                       _mm_extract_epi32(__TransitionsD, DELETION),
+                                       _mm_extract_epi32(__TransitionsD, DUMMY));
+   printf("XALIT X %10i %10i %10i %10i\n", _mm_extract_epi32(__TransitionsX, MATCH), 
+                                       _mm_extract_epi32(__TransitionsX, INSERTION),
+                                       _mm_extract_epi32(__TransitionsX, DELETION),
+                                       _mm_extract_epi32(__TransitionsX, DUMMY));
+   
+#endif 
+   __m128i __Index        = (__m128i) _mm_setzero_si128();
+   const __m128i __One    = _mm_set1_epi32(1);
+   const __m128i __Two    = _mm_add_epi32(__One, __One);
+   
+   __m128i __Mask         = _mm_cmpgt_epi32(__TransitionsI, __TransitionsX);
+   __TransitionsX         = _mm_blendv_epi8(__TransitionsX, __TransitionsI, __Mask);
+   __Index                = _mm_blendv_epi8(__Index, __One, __Mask);
+   
+   __Mask                 = _mm_cmpgt_epi32(__TransitionsM, __TransitionsX);
+   __TransitionsX         = _mm_blendv_epi8(__TransitionsX, __TransitionsM, __Mask);
+   __Index                = _mm_blendv_epi8(__Index, __Two, __Mask);
+   
+   const __m128i __Three  = _mm_add_epi32(__One, __Two);
+   __Mask                 = _mm_cmpgt_epi32(__TransitionsD, __TransitionsX);
+   __TransitionsX         = _mm_blendv_epi8(__TransitionsX, __TransitionsD, __Mask);
+   __Index                = _mm_blendv_epi8(__Index, __Three, __Mask);
+   
+   *Data                  = __TransitionsX;
+#ifdef XALIT_DEBUG
+   printf("XALIT MAXVAL %10i %10i %10i %10i\n", _mm_extract_epi32(__TransitionsX, MATCH), 
+                                                _mm_extract_epi32(__TransitionsX, INSERTION),
+                                                _mm_extract_epi32(__TransitionsX, DELETION),
+						_mm_extract_epi32(__TransitionsX, DUMMY));
+   printf("XALIT INDEX %10i %10i %10i %10i\n",  _mm_extract_epi32(__Index, MATCH), 
+                                            _mm_extract_epi32(__Index, INSERTION),
+                                            _mm_extract_epi32(__Index, DELETION),
+                                            _mm_extract_epi32(__Index, DUMMY));
+#endif
+   return __Index;
+} 
+
+static __m128i MaxP_border(__m128i * const Data, const __m128i Offset,
+          const ScoreTuple * const Border, const TransitionScores * const restrict Transition)
+{
+   __m128i __KM           = _mm_shuffle_epi32(Offset, _MM_SHUFFLE(MATCH,MATCH,MATCH,MATCH));
+   __m128i __TransitionsM = _mm_loadl_epi64((__m128i*) &(Transition->From[MATCH]));
+   __TransitionsM         = _mm_cvtepi16_epi32(__TransitionsM);
+   __TransitionsM         = _mm_insert_epi32(__TransitionsM, (int) Border->To[MATCH], DUMMY);
+#ifdef XALIT_DEBUG_PREVIOUS  
+  printf("XALIT M BORDER %10i %10i %10i %10i\n", _mm_extract_epi32(__TransitionsM, MATCH), 
+                                       _mm_extract_epi32(__TransitionsM, INSERTION),
+                                       _mm_extract_epi32(__TransitionsM, DELETION),
+                                       _mm_extract_epi32(__TransitionsM, DUMMY));
+#endif
+   __TransitionsM         = _mm_add_epi32(__TransitionsM, __KM);
+    
+   __m128i __KI           = _mm_shuffle_epi32(Offset, _MM_SHUFFLE(INSERTION,INSERTION,INSERTION,INSERTION));
+   __m128i __TransitionsI = _mm_loadl_epi64((__m128i*) &(Transition->From[INSERTION]));
+   __TransitionsI         = _mm_cvtepi16_epi32(__TransitionsI);
+//    __TransitionsI         = _mm_insert_epi32(__TransitionsI, (int) Border->To[INSERTION], DUMMY);
+#ifdef XALIT_DEBUG_PREVIOUS  
+  printf("XALIT I BORDER %10i %10i %10i %10i\n", _mm_extract_epi32(__TransitionsI, MATCH), 
+                                       _mm_extract_epi32(__TransitionsI, INSERTION),
+                                       _mm_extract_epi32(__TransitionsI, DELETION),
+                                       _mm_extract_epi32(__TransitionsI, DUMMY));
+#endif
+   __TransitionsI         = _mm_add_epi32(__TransitionsI, __KI);
+      
+   __m128i __KD           = _mm_shuffle_epi32(Offset, _MM_SHUFFLE(DELETION,DELETION,DELETION,DELETION));
+   __m128i __TransitionsD = _mm_loadl_epi64((__m128i*) &(Transition->From[DELETION]));
+   __TransitionsD         = _mm_cvtepi16_epi32(__TransitionsD);
+//    __TransitionsD         = _mm_insert_epi32(__TransitionsD, (int) Border->To[DELETION], DUMMY);
+#ifdef XALIT_DEBUG_PREVIOUS  
+  printf("XALIT D BORDER %10i %10i %10i %10i\n", _mm_extract_epi32(__TransitionsD, MATCH), 
+                                       _mm_extract_epi32(__TransitionsD, INSERTION),
+                                       _mm_extract_epi32(__TransitionsD, DELETION),
+                                       _mm_extract_epi32(__TransitionsD, DUMMY));
+#endif
+   __TransitionsD         = _mm_add_epi32(__TransitionsD, __KD);
+
+//    __m128i __TransitionsX = _mm_loadl_epi64((__m128i*) &(Transition->From[EXTRA]));
+   __m128i __TransitionsX = _mm_loadl_epi64((__m128i*) &(Border->mm));
+   __TransitionsX         = _mm_cvtepi16_epi32(__TransitionsX);
+   
+#ifdef XALIT_DEBUG
+   printf("XALIT KMID BORDER %10i %10i %10i %10i\n", _mm_extract_epi32(Offset, MATCH), 
+                                          _mm_extract_epi32(Offset, INSERTION),
+                                          _mm_extract_epi32(Offset, DELETION),
+                                          _mm_extract_epi32(Offset, DUMMY));
+   printf("XALIT M BORDER %10i %10i %10i %10i\n", _mm_extract_epi32(__TransitionsM, MATCH), 
+                                       _mm_extract_epi32(__TransitionsM, INSERTION),
+                                       _mm_extract_epi32(__TransitionsM, DELETION),
+                                       _mm_extract_epi32(__TransitionsM, DUMMY));
+   printf("XALIT I BORDER %10i %10i %10i %10i\n", _mm_extract_epi32(__TransitionsI, MATCH), 
+                                       _mm_extract_epi32(__TransitionsI, INSERTION),
+                                       _mm_extract_epi32(__TransitionsI, DELETION),
+                                       _mm_extract_epi32(__TransitionsI, DUMMY));
+   printf("XALIT D BORDER %10i %10i %10i %10i\n", _mm_extract_epi32(__TransitionsD, MATCH), 
+                                       _mm_extract_epi32(__TransitionsD, INSERTION),
+                                       _mm_extract_epi32(__TransitionsD, DELETION),
+                                       _mm_extract_epi32(__TransitionsD, DUMMY));
+   printf("XALIT X BORDER %10i %10i %10i %10i\n", _mm_extract_epi32(__TransitionsX, MATCH), 
+                                       _mm_extract_epi32(__TransitionsX, INSERTION),
+                                       _mm_extract_epi32(__TransitionsX, DELETION),
+                                       _mm_extract_epi32(__TransitionsX, DUMMY));
+   
+#endif 
+   
+   __m128i __Index        = (__m128i) _mm_setzero_si128();
+   const __m128i __One    = _mm_set_epi32(1,1,1,1);
+   const __m128i __Two    = _mm_add_epi32(__One, __One);
+   
+   __m128i __Mask         = _mm_cmpgt_epi32(__TransitionsI, __TransitionsX);
+   __TransitionsX         = _mm_blendv_epi8(__TransitionsX, __TransitionsI, __Mask);
+   __Index                = _mm_blendv_epi8(__Index, __One, __Mask);
+   
+   __Mask                 = _mm_cmpgt_epi32(__TransitionsM, __TransitionsX);
+   __TransitionsX         = _mm_blendv_epi8(__TransitionsX, __TransitionsM, __Mask);
+   __Index                = _mm_blendv_epi8(__Index, __Two, __Mask);
+   
+   const __m128i __Three  = _mm_add_epi32(__One, __Two);
+   __Mask                 = _mm_cmpgt_epi32(__TransitionsD, __TransitionsX);
+   __TransitionsX         = _mm_blendv_epi8(__TransitionsX, __TransitionsD, __Mask);
+   __Index                = _mm_blendv_epi8(__Index, __Three, __Mask);
+   
+   *Data                  = __TransitionsX;
+   
+#ifdef XALIT_DEBUG
+   printf("XALIT MAXVAL BORDER %10i %10i %10i %10i\n", _mm_extract_epi32(__TransitionsX, MATCH), 
+                                            _mm_extract_epi32(__TransitionsX, INSERTION),
+                                            _mm_extract_epi32(__TransitionsX, DELETION),
+                                            _mm_extract_epi32(__TransitionsX, DUMMY));
+   printf("XALIT INDEX BORDER %10i %10i %10i %10i\n",  _mm_extract_epi32(__Index, MATCH), 
+                                            _mm_extract_epi32(__Index, INSERTION),
+                                            _mm_extract_epi32(__Index, DELETION),
+                                            _mm_extract_epi32(__Index, DUMMY));
+#endif
+   return __Index;
+} 
+
+// This functions fills in IPMB, IPME and CALI that are then required !
+int xalit_sse41(const struct Profile * const restrict prf, const size_t N1, const size_t N2, const size_t bseq, const size_t lseq,
+          const unsigned char * const restrict Sequence, char * const restrict CALI, union lScores * const restrict iop,
+          struct Alignment * const restrict alignment, const _Bool * const restrict Lock)
+{
+   int IPM[2];
+   unsigned int K3 = (unsigned int) prf->Length;
+   unsigned int JS = 0;
+   //////////////////////////////////////////////////////////////////////////////////////////////
+   // Prologue
+   //////////////////////////////////////////////////////////////////////////////////////////////
+   const unsigned int JALB   = alignment->JALB;
+   const unsigned int JALE   = alignment->JALE;
+   const int CutOff          = alignment->JALS;
+   
+#ifdef XALIT_DEBUG
+   fprintf(stdout,"XALIT ALIGN %i %i %i %i %i | %u %u %i %lu\n",
+                  alignment->JAL1, alignment->JAL2, alignment->JALS, 
+                  alignment->JALB, alignment->JALE, JALB, JALE, CutOff, prf->Length );
+#endif
+   
+   //////////////////////////////////////////////////////////////////////////////////////////////
+   // Allocate memory
+   const size_t Memory = (prf->Length+1) * ((size_t)(JALE-JALB+2));
+   const unsigned int prfLength = prf->Length;
+
+#ifdef XALIT_DEBUG   
+   fprintf(stdout, "XALIT Memory is %lu\n", Memory);
+#endif
+   unsigned char * const restrict cpma = (unsigned char*) malloc(Memory*sizeof(unsigned char));
+   if (cpma == NULL) {
+      fputs("Unable to allocate memory to store coding/decoding path\n", stderr);
+      return -1;
+   }
+   
+   //////////////////////////////////////////////////////////////////////////////////////////////
+   // Loop through the path
+   //////////////////////////////////////////////////////////////////////////////////////////////
+   unsigned int K1 = 0;
+   register const TransitionScores * restrict pTransitions = prf->Scores.Insertion.Transitions;
+   
+   //////////////////////////////////////////////////////////////////////////////////////////////
+   // Beginning of sequence
+   register __m128i __KMID = _mm_set1_epi32((int) NLOW);
+   register __m128i __Index;
+   register const short int * pMatch = &(prf->Scores.Match.Alphabet[_D]);
+   register const size_t AlignStep   = prf->Scores.Match.AlignStep;
+   
+   if (JALB == 1) {
+      const register ScoreTuple * const restrict FirstSequenceProtein = prf->Scores.Insertion.FirstSequenceProtein;
+      __Index = MaxP_border(&iop[0].xmm, __KMID, &FirstSequenceProtein[0], pTransitions); 
+                          
+      // Store temporary data packed as much as possible into one byte
+      cpma[K1] = Ncode(__Index);
+      
+      // Loop through the rest of the profile
+      for (unsigned int iprf=1; iprf<=prfLength; ++iprf) {
+        pTransitions++;
+        const int KD = iop[iprf-1].Element[DELETION] + (int) *pMatch;
+        pMatch += AlignStep;
+        __KMID  = _mm_insert_epi32(__KMID, KD, DELETION);
+        __Index = MaxP_border(&(iop[iprf].xmm), __KMID, &FirstSequenceProtein[iprf], pTransitions);
+        cpma[++K1] = Ncode(__Index);
+      }
+   } else {
+      __Index = MaxP(&(iop[0].xmm), __KMID, pTransitions);
+   
+      // Store temporary data packed as much as possible into one byte
+      cpma[K1] = Ncode(__Index);
+   
+      // Loop through the rest of the profile
+      for (unsigned int iprf=1; iprf<=prfLength; ++iprf) {
+        pTransitions++;
+        const int KD = iop[iprf-1].Element[DELETION] + (int) *pMatch;
+        pMatch += AlignStep;
+        __KMID = _mm_insert_epi32(__KMID, KD, DELETION);
+        __Index = MaxP(&(iop[iprf].xmm), __KMID, pTransitions);
+        cpma[++K1] = Ncode(__Index);
+      }
+   }
+   
+   //////////////////////////////////////////////////////////////////////////////////////////////
+   // Loop through the internal sequence indices
+   for (unsigned int iseq = JALB; iseq<JALE; ++iseq) {
+      // Protected region   
+      __KMID = _mm_set1_epi32(NLOW);
+      if (Lock[iseq]) {
+         iop[N1-1].Element[MATCH] = NLOW;
+         for ( size_t i=N1; i<N2; ++i) {
+	  // _mm_storel_pi((__m64*) &iop[i].xmm, (__m128) __KMID);
+	  iop[i].xmm = __KMID;
+	 }
+      }  
+      
+      const unsigned int SequenceIndex = Sequence[iseq-1]; // Fortran one based index
+#ifdef XALIT_DEBUG
+      fprintf(stdout, "XALIT SEQUENCE %lu LETTER %u\n",iseq, SequenceIndex);
+#endif
+      // Pointers to Score data
+      pTransitions = prf->Scores.Insertion.Transitions;
+      register const short int * restrict pInsertion = prf->Scores.Insertion.Alphabet;
+      pMatch = prf->Scores.Match.Alphabet;
+      
+      register int KOPM = iop[0].Element[MATCH];
+      register int KI   = iop[0].Element[INSERTION] + (int) pInsertion[SequenceIndex]; 
+      __KMID = _mm_insert_epi32( __KMID, KI, INSERTION);
+      __Index    = MaxP(&iop[0].xmm, __KMID, pTransitions);
+      cpma[++K1] = Ncode(__Index);
+       
+      // Loop through the rest of the profile
+      for (unsigned int iprf=1; iprf<=prfLength; ++iprf) {
+        pTransitions++;
+        pInsertion   += AlignStep;
+        const int KM  = KOPM + (int) pMatch[SequenceIndex];
+        __KMID        = _mm_insert_epi32(__KMID, KM, MATCH); 
+        KI            = iop[iprf].Element[INSERTION] + (int) pInsertion[SequenceIndex];
+        __KMID        = _mm_insert_epi32(__KMID, KI, INSERTION); 
+        const int KD  = iop[iprf-1].Element[DELETION] + (int) pMatch[_D];
+        __KMID        = _mm_insert_epi32(__KMID, KD, DELETION); 
+        pMatch       += AlignStep;
+        KOPM          = iop[iprf].Element[MATCH];
+        __Index       = MaxP(&(iop[iprf].xmm), __KMID, pTransitions);
+        cpma[++K1]    = Ncode(__Index);
+      }     
+   }
+   
+   //////////////////////////////////////////////////////////////////////////////////////////////
+   // Last sequence index  
+   
+   // Protected region   
+   __KMID = _mm_set1_epi32(NLOW);
+   if (Lock[JALE]) {
+      iop[N1-1].Element[MATCH] = NLOW;
+      for ( size_t i=N1; i<N2; ++i) {
+	//_mm_storel_pi((__m64*) &iop[i].xmm, (__m128) __KMID);
+	iop[i].xmm = __KMID;
+      }
+   }
+   
+   const unsigned int SequenceIndex = Sequence[JALE-1]; // Fortran one based index
+      
+   // Pointers to Score data
+   pTransitions = prf->Scores.Insertion.Transitions;
+   register const short int * restrict pInsertion = prf->Scores.Insertion.Alphabet;
+   pMatch = prf->Scores.Match.Alphabet;
+   
+   register int KOPM = iop[0].Element[MATCH];   
+   register int KI   = iop[0].Element[INSERTION] + (int) pInsertion[SequenceIndex]; 
+   __KMID = _mm_insert_epi32( __KMID, KI, INSERTION);
+   
+   // Last Sequence element or not 
+   if (JALE == lseq) {
+      const ScoreTuple * const restrict LastSequenceProtein = prf->Scores.Insertion.LastSequenceProtein;
+      __Index    = MaxP_border(&iop[0].xmm, __KMID, &LastSequenceProtein[0], pTransitions);
+      cpma[++K1] = Ncode(__Index);
+
+      // Check if first profile insertion is enough to reach cutoff
+#ifdef XALIT_DEBUG
+      fprintf(stdout,"XALIT BORDER LAST SEQ %10i %10i %10i\n",0, KI + (int) pTransitions->From[INSERTION].To[EXTRA], KOPM);
+#endif
+      if ((KI + (int) pTransitions->From[INSERTION].To[EXTRA]) >= CutOff) {
+         K3 = 0;
+         JS = 1;
+      } else {
+         // Loop through the rest of the profile
+         for (unsigned int iprf=1; iprf<=prfLength; ++iprf) {
+           pTransitions++;
+           pInsertion   += AlignStep;
+           const int KM  = KOPM + (int) pMatch[SequenceIndex];
+           __KMID        = _mm_insert_epi32(__KMID, KM, MATCH); 
+           KI            = iop[iprf].Element[INSERTION] + (int) pInsertion[SequenceIndex];
+           __KMID        = _mm_insert_epi32(__KMID, KI, INSERTION); 
+           const int KD  = iop[iprf-1].Element[DELETION] + (int) pMatch[_D];
+           __KMID        = _mm_insert_epi32(__KMID, KD, DELETION); 
+           pMatch       += AlignStep;
+           KOPM          = iop[iprf].Element[MATCH];
+           __Index       = MaxP(&iop[iprf].xmm, __KMID, pTransitions);
+           cpma[++K1]    = Ncode(__Index);
+#ifdef XALIT_DEBUG
+	  fprintf(stdout,"XALIT BORDER LAST SEQ %10u %10i %10i %10i\n",iprf,
+		  KI + (int) LastSequenceProtein[iprf].To[INSERTION],
+		  KM + (int) LastSequenceProtein[iprf].To[MATCH],
+		  KD + (int) LastSequenceProtein[iprf].To[DELETION]
+ 		);
+#endif
+	  
+           if ((KI + (int) LastSequenceProtein[iprf].To[INSERTION]) >= CutOff) {
+               JS = 1;
+               K3 = iprf;
+               break;
+           } else if ((KM + (int) LastSequenceProtein[iprf].To[MATCH]) >= CutOff) {
+               JS = 2;
+               K3 = iprf;
+               break;
+           } else if ((KD + (int) LastSequenceProtein[iprf].To[DELETION]) >= CutOff) {
+               JS = 3;
+               K3 = iprf;
+               break;
+           }
+         }
+     }
+      
+   } else {
+      __Index    = MaxP(&iop[0].xmm, __KMID, pTransitions);
+      cpma[++K1] = Ncode(__Index);
+
+      // Check if first profile insertion is enough to reach cutoff
+      if ((KI + (int) pTransitions->From[INSERTION].To[EXTRA]) >= CutOff) {
+         K3 = 0;
+         JS = 1;
+      } else {
+         // Loop through the rest of the profile
+         for (unsigned int iprf=1; iprf<=prfLength; ++iprf) {
+           pTransitions++;
+           pInsertion   += AlignStep;
+           const int KM  = KOPM + (int) pMatch[SequenceIndex];
+           __KMID        = _mm_insert_epi32(__KMID, KM, MATCH); 
+           KI            = iop[iprf].Element[INSERTION] + (int) pInsertion[SequenceIndex];
+           __KMID        = _mm_insert_epi32(__KMID, KI, INSERTION); 
+           const int KD  = iop[iprf-1].Element[DELETION] + (int) pMatch[_D];
+           __KMID        = _mm_insert_epi32(__KMID, KD, DELETION); 
+           pMatch       += AlignStep;
+           KOPM          = iop[iprf].Element[MATCH];
+           __Index       = MaxP(&iop[iprf].xmm, __KMID, pTransitions);
+           cpma[++K1]    = Ncode(__Index);
+           
+           if ((KI + (int) pTransitions->From[INSERTION].To[EXTRA]) >= CutOff) {
+               JS = 1;
+               K3 = iprf;
+               break;
+           } else if ((KM + (int) pTransitions->From[MATCH].To[EXTRA]) >= CutOff) {
+               JS = 2;
+               K3 = iprf;
+               break;
+           } else if ((KD + (int) pTransitions->From[DELETION].To[EXTRA]) >= CutOff) {
+               JS = 3;
+               K3 = iprf;
+               break;
+           }
+         }
+      }
+   }
+   
+   //////////////////////////////////////////////////////////////////////////////////////////////
+   // Epilogue
+   //////////////////////////////////////////////////////////////////////////////////////////////
+   //Epilogue:
+ 
+   int K2          = JALE-1;
+   IPM[1]          = K3 - prf->Length - 1;
+   unsigned int J0 = 0;
+   int J1          = 0;
+   
+   //////////////////////////////////////////////////////////////////////////////////////////////
+   // Fill in unused profile indices with character '-'
+   for (unsigned int iprf = prfLength; iprf>K3; iprf--) {
+      CALI[++J1] = (unsigned char) '-';
+   }
+   
+   //////////////////////////////////////////////////////////////////////////////////////////////
+   // Continue backward analysis of profile up to JS = 0
+   const register char * const restrict CABC = prf->CABC; 
+   do {
+#ifdef XALIT_DEBUG
+      printf("XALIT BACKTRACE %10i %10i %8u %8u %10i\n", K1, K2, K3, JS, J1+1);
+#endif
+      // Beware that ordering is important here
+      if ( JS == 1 ) {
+         ///////////////////////////////////////////////
+         // Insertion treated first
+         CALI[++J1]  = (unsigned char) 32 + CABC[Sequence[K2]];
+         K1         -= (int) prfLength + 1;
+         --K2;
+      } else if ( JS == 2 ) {
+         ///////////////////////////////////////////////
+         // Match treated second
+         CALI[++J1]  = CABC[Sequence[K2]];
+         K1         -= (int) prfLength + 2;
+         --K2;
+         --K3;
+      } else if (JS == 3 ) {
+         ///////////////////////////////////////////////
+         // Deletion treated last
+         CALI[++J1] = '-';
+         --K1;
+         --K3;
+      }
+      
+      // Decode next traceback
+      unsigned int JM, JI, JD;
+      Dcode(cpma[K1], &JM, &JI, &JD);
+      
+      J0 = JS;
+      // Beware that ordering is important here
+      if ( JS == 1 ) {
+         ///////////////////////////////////////////////
+         // Insertion treated first
+        JS = JI;
+      } else if ( JS == 2) {
+         ///////////////////////////////////////////////
+         // Match treated second
+         JS = JM;
+      } else if (JS == 3 ) {
+         ///////////////////////////////////////////////
+         // Deletion treated last
+         JS = JD;
+      }
+   } while (JS > 0);
+   
+   // Free no more needed memory
+   free(cpma);
+   
+   K3 = (K3 >= prfLength) ? 0 : K3;
+  
+   for (int iprf=K3; iprf>=1; iprf--) {
+      CALI[++J1] = '-';
+   }
+   
+#ifdef XALIT_DEBUG 
+   fputs("XALIT SEQUENCE ", stderr);
+   for (int i=1; i<=J1; ++i) fputc(CALI[i],stderr);
+   fputs("\n", stderr);
+#endif
+
+   const int LALI = J1;
+   J1 = (J1 + 1)/2;
+   for (int iprf = LALI/2+1; iprf<=LALI; ++iprf) {
+      register const char c = CALI[iprf];
+      CALI[iprf] = CALI[J1];
+      CALI[J1]   = c;
+      --J1;
+   }
+   
+   CALI[LALI+1] = '\0';
+   
+   IPM[0] = K3 + 1;
+   
+   alignment->IPMB = IPM[0];
+   alignment->IPME = IPM[1];
+
+   return 0;
+}
+
diff --git a/src/C/utils/Normalization.c b/src/C/utils/Normalization.c
new file mode 100644
index 0000000..77ca91b
--- /dev/null
+++ b/src/C/utils/Normalization.c
@@ -0,0 +1,176 @@
+/*******************************************************
+                        PFTOOLS
+ *******************************************************
+  Jan 16, 2011 Normalization.c
+ *******************************************************
+ (C) 2011 Swiss Institute of Bioinformatics
+     Thierry Schuepbach (thierry.schuepbach at isb-sib.ch)
+ *******************************************************/
+
+#include <stdlib.h>
+#include <inttypes.h>
+#include <math.h>
+#include <mm_malloc.h>
+#include <alloca.h>
+#include "profile.h"
+
+//   Subroutine CPAve(IMPP,IDMP,LPRF,CABC,NABC,PAVE)
+// 
+//   Integer           IMPP(0:27,0:IDMP)
+//   Character         CABC(0:26)
+//   Real              PAVE(0:26)
+// 
+//   Do  I1=0,NABC
+//       PAVE(I1)=0
+//   End Do
+//   Do  I1=1,LPRF
+//       Do  I2=0,NABC
+// 	PAVE(I2)=PAVE(I2)+IMPP(I2,I1) 
+//       End do  
+//   End Do 
+// 
+//   Return
+//   End
+
+void InitAverage(const union Scores * Matrices, const size_t prfLength, const size_t AlphabetLength, SAverage * const Average)
+{
+ const size_t AlignedStep = Matrices->Match.AlignStep;
+ const short int * restrict lMatch = Matrices->Match.Alphabet;
+ 
+ /* Allocate memory */
+ float * const restrict Weights     = _mm_malloc(AlphabetLength*sizeof(float),16);
+ if (Weights == 0) {
+    Average->Weights = 0;
+    Average->size    = 0;
+ } else {
+    memset(Weights, 0, AlphabetLength*sizeof(float));
+    for (size_t iprf=0; iprf<prfLength; ++iprf) {
+      for (size_t alpha=0; alpha<AlphabetLength; ++alpha) Weights[alpha] += (float) lMatch[alpha];
+      lMatch += AlignedStep;
+    }
+    Average->Weights = Weights;
+    Average->size    = AlphabetLength;
+ }
+}
+
+void FreeAverage(SAverage * const Average)
+{
+    _mm_free(Average->Weights);
+}
+
+// Subroutine CFAve(ISEQ,IDMS,LSEQ,CABC,NABC,FAVE)
+// 
+//   Integer*2         ISEQ(IDMS)
+//   Character         CABC(0:26)
+//   Real              FAVE(0:26)
+// 
+//   Do  I1=0,NABC
+//       FAVE(I1)=0
+//   End Do
+//   Do  I1=1,LSEQ
+//       J1=ISEQ(I1)
+//       FAVE(J1)=FAVE(J1)+1
+//   End Do 
+//   Do  I1=0,NABC
+//       FAVE(I1)=FAVE(I1)/LSEQ
+//   End Do
+// 
+//   Return
+//   End
+
+
+float ComputeAverageFrequencies(const PFSequence * const Sequence, SAverage * const Average) 
+{
+    const size_t AlphabetLength = Average->size;
+    const uintptr_t stack = (uintptr_t) alloca(AlphabetLength*sizeof(float)+15);
+    float * const restrict data = (float*) ( stack & ~15 );
+    memset(data, 0, AlphabetLength*sizeof(float));
+    
+    const size_t SeqLength = Sequence->Length;
+    for (size_t iseq=0; iseq<SeqLength; ++iseq) {
+      const size_t index = (size_t) Sequence->ProfileIndex[iseq];
+      data[index] += 1.0f;
+    }
+    const float scale = 1.0f/( (float)SeqLength );
+    float value = 0.0f;
+    const float * const restrict Weights = Average->Weights;
+    for (size_t alpha=0; alpha<AlphabetLength; ++alpha) value += scale*Weights[alpha]*data[alpha];
+    return value;
+}
+
+// Subroutine NtoR(R,N,RNOP,KNPM,MAXN,INOR,IFUN,LSEQ,RAVE)
+// 
+//         Real              RNOP(KNPM,MAXN)
+// 
+//         If     (IFUN.EQ.1) then 
+//            X=(R-RNOP(1,INOR)) / RNOP(2,INOR) 
+//         Else if(IFUN.EQ.2) then 
+//            X=( RNOP(1,INOR)*(1.0-EXP(RNOP(2,INOR)*LSEQ-RNOP(3,INOR) )))
+//      *      *( RNOP(5,INOR) * R + RNOP(4,INOR) )
+//         Else if(IFUN.EQ.3) then 
+//            X=( RNOP(1,INOR)*(1.0-EXP(RNOP(2,INOR)*LSEQ-RNOP(3,INOR) )))
+//      *      *( RNOP(5,INOR) * R + RNOP(4,INOR) ) + RAVE
+//         End if 
+//            N=INT(X)
+//            If(Real(N).LT.X) N=N+1
+//         Return
+//         End 
+
+int N2R_1(const float R, const size_t SeqLength, const float AverageValue)
+{
+ const float tmp = ( R - Normalization->RNOP[0] ) / Normalization->RNOP[0] + 0.5f;
+ return (int) tmp;
+}
+
+int N2R_2(const float R, const size_t SeqLength, const float AverageValue)
+{
+ const float tmp0 = 1.0f - expf(Normalization->RNOP[1]*(float) SeqLength - Normalization->RNOP[2]);
+ const float tmp1 = Normalization->RNOP[0]*tmp0*(Normalization->RNOP[4]*R + Normalization->RNOP[3]);
+ return (int) (tmp1 + 0.5f);
+}
+
+int N2R_3(const float R, const size_t SeqLength, const float AverageValue)
+{
+ const float tmp0 = 1.0f - expf(Normalization->RNOP[1]*(float) SeqLength - Normalization->RNOP[2]);
+ const float tmp1 = Normalization->RNOP[0]*tmp0*(Normalization->RNOP[4]*R + Normalization->RNOP[3]);
+ return (int) (tmp1 + AverageValue + 0.5f);
+}
+
+// Subroutine RtoN(N,R,RNOP,KNPM,MAXN,INOR,IFUN,LSEQ,RAVE)
+// 
+// Real              RNOP(KNPM,MAXN)
+// 
+// If     (IFUN.EQ.1) then 
+//     R=RNOP(1,INOR)+RNOP(2,INOR)*Real(N)
+// Else if(IFUN.EQ.2) then 
+//     R=( Real(N) /
+// *       ( RNOP(1,INOR)*(1.0-EXP(RNOP(2,INOR)*LSEQ-RNOP(3,INOR) )))
+// *       - RNOP(4,INOR) ) / RNOP(5,INOR)
+// Else if(IFUN.EQ.3) then 
+//     R=( (N-RAVE) /
+// *       ( RNOP(1,INOR)*(1.0-EXP(RNOP(2,INOR)*LSEQ-RNOP(3,INOR) )))
+// *       - RNOP(4,INOR) ) / RNOP(5,INOR)
+// End if 
+// Return
+// End
+
+float R2N_1(const int N, const size_t SeqLength, const float AverageValue)
+{
+  return Normalization->RNOP[0] + Normalization->RNOP[1]*((float) N);
+}
+
+float R2N_2(const int N, const size_t SeqLength, const float AverageValue)
+{
+  const float tmp0 = 1.0f - expf(Normalization->RNOP[1]*(float) SeqLength - Normalization->RNOP[2]);
+  const float tmp1 = ((float) N )/tmp0 - Normalization->RNOP[3];
+  
+  return tmp1/Normalization->RNOP[4];
+}
+
+float R2N_3(const int N, const size_t SeqLength, const float AverageValue)
+{
+  const float tmp0 = 1.0f - expf(Normalization->RNOP[1]*(float) SeqLength - Normalization->RNOP[2]);
+  const float tmp1 = ((float) N - AverageValue)/tmp0 - Normalization->RNOP[3];
+  
+  return tmp1/Normalization->RNOP[4];
+}
\ No newline at end of file
diff --git a/src/C/utils/ReadSequence.c b/src/C/utils/ReadSequence.c
new file mode 100644
index 0000000..c294d42
--- /dev/null
+++ b/src/C/utils/ReadSequence.c
@@ -0,0 +1,324 @@
+/* TODO:
+ *  Use the information from the filesystem to adjust buffer size reading.
+ */
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdbool.h>
+#include <string.h>
+
+#include "sequence.h"
+
+/* Beware of alignment before changing these !!! */
+#define BUFFER_SIZE         1024*1024
+#define CHAIN_SEGMENT_SIZE       8196
+#define MAX_NUMBER_OF_CHAIN      8196
+
+/* NOTE: For mmap reading we extend the sequence count by one and store
+ *       the file size in the extra data, that is the sequence count + 1
+ * 	 structure should have
+ * 		off_t Offset = file size in byte;
+ *		size_t HeaderLength = 0;
+ *		size_t SequenceLength = 0;
+ */
+
+int AnalyzeFASTAStructure(char * const FileName, FASTAStructure * const Info)
+{
+  char Buffer[BUFFER_SIZE] __attribute__((aligned(16)));
+  off_t *Offset_chain_ptr[MAX_NUMBER_OF_CHAIN] ;
+  size_t *Header_chain_ptr[MAX_NUMBER_OF_CHAIN];
+  struct stat FileStat;
+  size_t MaxSequenceSize = 0;
+  s_Data * restrict DataPtr = NULL;
+  _Bool HeaderPending = false;
+
+  strncpy(Info->FileName, FileName, 256);
+  
+  const int FileDescriptor = open(FileName, O_RDONLY);
+  if ( FileDescriptor == -1) {
+    fprintf(stderr, "Error occured while accessing file %s\n", FileName);
+    perror("The error reads ");
+    return 1;
+  }
+
+  if (fstat(FileDescriptor, &FileStat) == -1 ) {
+    fprintf(stderr, "Error occured while accessing file %s\n", FileName);
+    perror("The error reads ");
+    return 1;
+  }
+  
+  if (FileStat.st_size == 0 )
+    return 1;
+  else
+    Info->FileSize = FileStat.st_size;
+  
+  /* Allocate initial CHAIN */
+  register void * const data = (void*) malloc(CHAIN_SEGMENT_SIZE*(sizeof(off_t) + sizeof(size_t)));
+  if (data == NULL) {
+    fputs("Unable to allocate sufficient memory.\n", stderr);
+    return 1;
+  }
+  Offset_chain_ptr[0] = (off_t*) data;
+  Header_chain_ptr[0] = (size_t*) &((off_t*) data)[CHAIN_SEGMENT_SIZE];
+ 
+  size_t ChainCount = 1;
+  size_t SequenceCount  = 0;
+  register off_t * restrict Offsets  = Offset_chain_ptr[0];
+  register size_t * restrict Headers = Header_chain_ptr[0];
+  
+  /* Initial line does not begin with a '\n' */
+  off_t BufferOffset  = lseek (FileDescriptor, 0, SEEK_CUR);
+  size_t length       = read(FileDescriptor, Buffer, BUFFER_SIZE*sizeof(char));
+  _Bool LastWasReturn = true;
+
+  if (length > 0) {
+    do {
+      if (LastWasReturn) {                                              /* Tricky end of line located on */
+                                                                        /* multiple of buffer size       */
+        if (HeaderPending) {                                            /* Terminate pending header */
+            *Headers = (size_t) ( BufferOffset - 1 - *Offsets );
+            if ( ++SequenceCount == CHAIN_SEGMENT_SIZE) {               /* More allocation required or not? */
+              if (++ChainCount == MAX_NUMBER_OF_CHAIN) {
+                fputs("Chaining limit reached, consider increasing hard coded value.\n", stderr);
+                goto FreeMemory;
+              }
+              {
+                register void * data = malloc(CHAIN_SEGMENT_SIZE*(sizeof(off_t) + sizeof(size_t)));
+                if (data == NULL) {
+                  fputs("Unable to allocate sufficient memory.\n", stderr);
+                  goto FreeMemory;
+                }
+                Offset_chain_ptr[ChainCount-1] = (off_t*) data;
+                Header_chain_ptr[ChainCount-1] = (size_t*) &((off_t*) data)[CHAIN_SEGMENT_SIZE];
+              }
+              Offsets  = Offset_chain_ptr[ChainCount-1];
+              Headers  = Header_chain_ptr[ChainCount-1];
+
+              SequenceCount = 0;
+            } else {
+              ++Headers;
+              ++Offsets;
+            }
+            HeaderPending = false;
+        } else if (Buffer[0] == '>' ) {                                 /* New sequence starting */                                    
+          *Offsets = BufferOffset;
+          HeaderPending  = true;
+        }
+        LastWasReturn = false;
+      }
+      
+      for (size_t i=1; i<length; ++i) {
+        if (Buffer[i-1] == '\n') {                                      /* New Line */
+          if (Buffer[i] == '>' ) {                                      /* New sequence starting */
+            *Offsets = BufferOffset + (off_t) i;
+            HeaderPending  = true;
+          } else if (HeaderPending) {                                   /* Terminate pending header */
+            *Headers = (size_t) ( BufferOffset + (off_t) i - 1 - *Offsets );
+            if ( ++SequenceCount == CHAIN_SEGMENT_SIZE) {               /* More allocation required or not? */
+              if (++ChainCount == MAX_NUMBER_OF_CHAIN) {
+                fputs("Chaining limit reached, consider increasing hard coded value.\n", stderr);
+                goto FreeMemory;
+              }
+              {
+                register void * data = malloc(CHAIN_SEGMENT_SIZE*(sizeof(off_t) + sizeof(size_t)));
+                if (data == NULL) {
+                  fputs("Unable to allocate sufficient memory.\n", stderr);
+                  goto FreeMemory;
+                }
+                Offset_chain_ptr[ChainCount-1] = (off_t*) data;
+                Header_chain_ptr[ChainCount-1] = (size_t*) &((off_t*) data)[CHAIN_SEGMENT_SIZE];
+              }
+              Offsets  = Offset_chain_ptr[ChainCount-1];
+              Headers  = Header_chain_ptr[ChainCount-1];
+
+              SequenceCount = 0;
+            } else {
+              ++Headers;
+              ++Offsets;
+            }
+            HeaderPending = false;
+          }
+        }
+      }
+      if (Buffer[length-1] == '\n') {                                   /* Tricky end of line located on */
+        LastWasReturn = true;                                           /* multiple of buffer size       */
+      }
+      BufferOffset  = lseek (FileDescriptor, 0, SEEK_CUR);
+      length = read(FileDescriptor, Buffer, BUFFER_SIZE*sizeof(char));
+    } while (length > 0);
+
+    /* Package the overall data */
+
+    SequenceCount += (ChainCount-1)*CHAIN_SEGMENT_SIZE;
+    
+    DataPtr = (s_Data*) malloc((1+SequenceCount)*sizeof(s_Data));
+    if ( DataPtr == NULL) {
+      fputs("Unable to allocate sufficient memory\n", stderr);
+      goto FreeMemory;
+    }
+
+
+    /* Fill up the data */
+    Offsets    = Offset_chain_ptr[0];
+    Headers    = Header_chain_ptr[0];
+    ChainCount = 0;
+    for (size_t i=0; i<SequenceCount-1; ++i) {
+      const size_t index = i % CHAIN_SEGMENT_SIZE;
+      if ( index != CHAIN_SEGMENT_SIZE-1 ) {
+        DataPtr[i].Offset         = Offsets[index];
+        DataPtr[i].HeaderLength   = Headers[index];
+        register const size_t SequenceLength = Offsets[index+1] - Offsets[index];
+        MaxSequenceSize = SequenceLength > MaxSequenceSize? SequenceLength : MaxSequenceSize;
+        DataPtr[i].SequenceLength = SequenceLength - Headers[index] - 1;
+        
+      } else {
+        DataPtr[i].Offset         = Offsets[index];
+        DataPtr[i].HeaderLength   = Headers[index];
+
+        free(Offset_chain_ptr[ChainCount++]);
+        Offsets = Offset_chain_ptr[ChainCount];
+        Headers = Header_chain_ptr[ChainCount];
+
+        register const size_t SequenceLength = Offsets[0] - DataPtr[i].Offset;
+        MaxSequenceSize = SequenceLength > MaxSequenceSize? SequenceLength : MaxSequenceSize;
+        DataPtr[i].SequenceLength = SequenceLength - DataPtr[i].HeaderLength - 1;
+      }
+    }
+
+    const size_t index = (SequenceCount-1) % CHAIN_SEGMENT_SIZE;
+    DataPtr[SequenceCount-1].Offset         = Offsets[index];
+    DataPtr[SequenceCount-1].HeaderLength   = Headers[index];
+    register const size_t SequenceLength    = FileStat.st_size - Offsets[index];
+    MaxSequenceSize = SequenceLength > MaxSequenceSize? SequenceLength : MaxSequenceSize;
+    DataPtr[SequenceCount-1].SequenceLength = SequenceLength - Headers[index] - 1;
+    
+    //free(Offsets);
+  }
+  close(FileDescriptor);
+ 
+  /* Add extra file size at last DataPtr */
+  DataPtr[SequenceCount].Offset = FileStat.st_size;
+  DataPtr[SequenceCount].HeaderLength = 0;
+  DataPtr[SequenceCount].SequenceLength = 0;
+  
+  Info->DataPtr         = DataPtr;
+  Info->SequenceCount   = SequenceCount;
+  Info->MaxSequenceSize = MaxSequenceSize+1;
+  
+  return 0;
+  
+  FreeMemory:
+    for (size_t i=0; i<ChainCount; ++i) {
+      free(Offset_chain_ptr[i]);
+    }
+  return 1;
+}
+
+int ExportFASTAStructure(FILE* stream, const FASTAStructure * const Info)
+{
+ 
+  unsigned short FileNameLength = (unsigned short) strlen(Info->FileName);
+  if (fwrite(&(FileNameLength), sizeof(unsigned short), 1, stream) != 1) return 1;
+  if (fwrite(Info->FileName, sizeof(char), (size_t) FileNameLength, stream) != (size_t) FileNameLength) return 1;
+  if (fwrite(&(Info->FileSize), sizeof(off_t), 1, stream) != 1) return 1;
+  unsigned long tmp = (unsigned long) Info->SequenceCount;
+  if (fwrite(&tmp, sizeof(unsigned long), 1, stream) != 1) return 1;
+  tmp = (unsigned long) Info->MaxSequenceSize;
+  if (fwrite(&tmp, sizeof(unsigned long), 1, stream) != 1) return 1;
+  if (fwrite(Info->DataPtr, sizeof(s_Data), 1+Info->SequenceCount, stream) != 1+Info->SequenceCount) return 1;
+  
+ return 0; 
+}
+
+int ImportFASTAStructure(FILE* stream, FASTAStructure * const Info)
+{
+  unsigned short FileNameLength;
+  unsigned long SequenceCount, MaxSequenceSize; 
+  memset(Info->FileName, 0, 256*sizeof(char));
+  
+  
+  if (fread(&FileNameLength, sizeof(unsigned short), 1, stream) != 1) return 1;
+  if (fread(Info->FileName, sizeof(char), (size_t) FileNameLength, stream) != FileNameLength) return 1;
+  if (fread(&(Info->FileSize), sizeof(off_t), 1, stream) != 1) return 1;
+  if (fread(&SequenceCount, sizeof(unsigned long), 1, stream) != 1) return 1;
+  Info->SequenceCount = (size_t) SequenceCount;
+  if (fread(&MaxSequenceSize, sizeof(unsigned long), 1, stream) != 1) return 1;
+  Info->MaxSequenceSize = (size_t) MaxSequenceSize;
+  Info->DataPtr = (s_Data*) malloc((1+Info->SequenceCount)*sizeof(s_Data));
+  if ( Info->DataPtr == NULL) {
+    fputs("Unable to allocate sufficient memory to hold FASTA structure\n", stderr);
+    return 1;
+  }
+  if (fread(Info->DataPtr, sizeof(s_Data), (1+Info->SequenceCount), stream) != 1+Info->SequenceCount) return 1;
+  
+ return 0; 
+}
+
+
+#ifdef _TEST
+int main(int argc, char *argv[])
+{
+  char Buffer[2048] __attribute__((aligned(16)));
+  FASTAStructure FASTA;
+  
+  if (argc < 2 || argc > 3) { fputs("Provide just a FASTA file\n", stderr); return 1; }
+  printf("Starting analysis of %s...\n", argv[1]);
+
+  const int res = AnalyzeFASTAStructure(argv[1], &FASTA);
+  if (res != 0) {
+    fputs("Error found.\n", stderr);
+  } else {
+    printf("FASTA file %s analyzed\n\tFound %lu sequences within %lu bytes\n\tBiggest sequence entry is %lu bytes\n",
+           argv[1],
+           FASTA.SequenceCount,
+           FASTA.FileSize,
+           FASTA.MaxSequenceSize);
+    if (argc > 2) {
+      const int index = (size_t) atoi(argv[2]);
+      if ( index < 0) {
+        sprintf(Buffer, "%s.copy\0", argv[1]);
+        printf("Recreating global file for diff command in %s\n", Buffer);
+        FILE* const out = fopen(Buffer, "w");
+        FILE* const in  = fopen(argv[1], "r");
+        for (size_t i=0; i<FASTA.SequenceCount; ++i) {
+          fseek(in, (long) FASTA.DataPtr[i].Offset, SEEK_SET);
+          fread(Buffer, FASTA.DataPtr[i].HeaderLength, sizeof(char), in);
+          Buffer[FASTA.DataPtr[i].HeaderLength] = '\0';
+          fprintf(out,"%s\n", Buffer);
+          if (FASTA.DataPtr[i].SequenceLength >= 2048) {
+            fprintf(stderr, "Sorry but allocated buffer cannot hold sequence length of %lu\n",FASTA.DataPtr[i].SequenceLength );
+            return 1;
+          }
+          fread(Buffer, FASTA.DataPtr[i].SequenceLength, sizeof(char), in);
+          Buffer[FASTA.DataPtr[i].SequenceLength] = '\0';
+          fprintf(out, "%s\n", &Buffer[1]);
+        }
+        fclose(in);
+        fclose(out);
+      } else if (index < FASTA.SequenceCount) {
+        printf("Sequence %i is at offset %li with header size of %lu and sequence size of %lu\n",
+               index,
+               FASTA.DataPtr[index].Offset,
+               FASTA.DataPtr[index].HeaderLength,
+               FASTA.DataPtr[index].SequenceLength);
+
+        FILE* const in = fopen(argv[1], "r");
+        fseek(in, (long) FASTA.DataPtr[index].Offset, SEEK_SET);
+        fread(Buffer, FASTA.DataPtr[index].HeaderLength, sizeof(char), in);
+        Buffer[FASTA.DataPtr[index].HeaderLength] = '\0';
+        printf("Header : %s\n", Buffer);
+        if (FASTA.DataPtr[index].SequenceLength < 2048) {
+          fread(Buffer, FASTA.DataPtr[index].SequenceLength, sizeof(char), in);
+          Buffer[FASTA.DataPtr[index].SequenceLength] = '\0';
+          printf("Sequence : %s\n", Buffer);
+        } else {
+          fputs("Sorry but allocated buffer cannot hold sequence length\n", stderr);
+        }
+        fclose(in);
+      } 
+    }
+    
+  }
+  
+  return 0;
+}
+#endif
diff --git a/src/C/utils/io.c b/src/C/utils/io.c
new file mode 100644
index 0000000..fb19f5b
--- /dev/null
+++ b/src/C/utils/io.c
@@ -0,0 +1,1201 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include <inttypes.h>
+#include <stdbool.h>
+#include <mm_malloc.h>
+#include <errno.h>
+#define _GNU_SOURCE
+#include <string.h>
+#include <limits.h>
+#include "profile.h"
+
+/* TODO:
+ *       - Profile length is zero based. We therefore added an extra line to account for it.
+ *         Nevertheless, no memory space checking is so far implemented.
+ *         So potentially we may completely screw up upon incorrect profile and segfault!
+ */
+
+#define SUB_COMMAND_MAX_SIZE 16
+
+/*
+ * This structure is fed by the Line Analyzer which parses the input, transforms delimiting symbols
+ * into '\0' end character and sets the starting pointer within the ProfileLine structure.
+ */
+struct ProfileLine { 
+  char * command;
+  char * subcommand;
+  char * keywords[32];
+  char * values[32];
+  size_t counter;
+  _Bool isMatrix;
+};
+
+static char previousSubCommand[SUB_COMMAND_MAX_SIZE];
+
+/*
+ * Reads a line of profile and corrects the ending with a '\0' character.
+ */
+static inline void GetLine(FILE * const stream, char * const restrict Destination, const size_t MaxLength)
+{
+  if (fgets(Destination, MaxLength, stream) != NULL) {
+    if (Destination[strlen(Destination)-1] == '\n') Destination[strlen(Destination)-1] = '\0';
+  }
+}
+
+/*
+ * Move to the first non space or tab character while within memory up to MaxMempoint.
+ */
+static inline char * FirstChar(const char * restrict Line, const uintptr_t MaxMemPoint)
+{
+  char * pos = (char*) Line; 
+  while ( (*pos == ' ') || (*pos == '\t') ) {
+    if ( (uintptr_t) ++pos == MaxMemPoint) break;
+  }
+  return pos;
+}
+
+/*
+ * Copy the string Line into Destination until a given symbol is found. Max length applies.
+ */
+static inline char * CopyUptoSymbol(char * const restrict Destination, const char * restrict Line, const char Symbol, const size_t MaxLength)
+{
+  // WARNING: Destination should be cleared before since no '\0' will be added.
+
+  for (size_t i=0; i<MaxLength; i++) {
+    Destination[i] = Line[i];
+    if ( Line[i] == Symbol){
+      return (char*) &Line[i+1];
+    }
+  }
+  return NULL;
+}
+
+static inline char * CopySubCommand(char * const restrict Destination, char * restrict Line, const char Symbol, const uintptr_t MaxLength)
+{
+#ifdef _DEBUG_VERBOSE_
+  fputs(" COPY_SUB_COMMAND : '",stdout);
+#endif
+  for (size_t i=0; i<SUB_COMMAND_MAX_SIZE-1; ++i) {
+    if ((uintptr_t) &Line[i] > MaxLength) break;
+
+    if ( Line[i] == Symbol){
+      Destination[i] = '\0';
+      Line[i] = '\0';
+#ifdef _DEBUG_VERBOSE_
+      puts("'");
+#endif
+      return (char*) &Line[i+1];
+    }
+    Destination[i] = Line[i];
+#ifdef _DEBUG_VERBOSE_
+    fputc((int) Line[i], stdout);
+#endif
+  }
+  return NULL;
+}
+/*
+ * Trim the string from the right
+ */
+static inline void CleanEndString(char * const restrict String, const size_t Length)
+{
+  char * pos = &String[Length-1];
+  while ( pos >= String && *pos == ' ') *pos-- = '\0';
+}
+
+/*
+ * Move up to symbol while staying within memory limit.
+ */
+static inline char * GoUptoSymbol(char * const restrict String, const char Symbol, const uintptr_t MaxMemPoint)
+{
+  char * pos = String;
+  while ( (uintptr_t) pos <= MaxMemPoint && *pos != Symbol) ++pos;
+  if (*pos == Symbol) {
+    *pos = '\0';
+    ++pos;
+  }
+  return pos;
+}
+
+/*
+ * Count and replace symbol with '\0' character within given string. Overall is bounded by a maximum memory position
+ * Pay attention that not all count will give correct amount of tags. Indeed commas are n-1 tags.
+ */
+static inline size_t CountAndReplaceSymbol(char * const restrict String, const char Symbol, const uintptr_t MaxMemPoint)
+{
+  char * pos = String;
+#ifdef _DEBUG_VERBOSE_
+  fputs("CountAndReplaceSymbol : ",stdout); fflush(stdout); int c=0;
+  while ( (uintptr_t) pos <= MaxMemPoint ) {
+    printf("%i @0x%16.16x of 0x%16.16x\t", c++, (uintptr_t) pos, MaxMemPoint);
+    fputc((int) *pos,stdout);
+    fputc((int) '\n',stdout);
+    pos++;
+    fflush(stdout);
+  }
+  fputs("\n", stdout);
+  fputs("CountAndReplaceSymbol : ",stdout);fflush(stdout);
+#endif
+  pos = String;
+  size_t count = 0;
+  while ( (uintptr_t) pos <= MaxMemPoint ) {
+    if (*pos == Symbol) {
+      ++count;
+#ifdef _DEBUG_VERBOSE_
+      fputs("\e[31;40m",stdout);
+      fputc((int) *pos,stdout);
+      fputs("\e[0m",stdout);
+#endif
+      *pos = '\0';
+    }
+#ifdef _DEBUG_VERBOSE_
+    else {
+      fputc((int) *pos,stdout);
+    } 
+#endif
+    ++pos;
+  }
+#ifdef _DEBUG_VERBOSE_
+  printf("\t count = %lu\n", count);
+#endif
+  return count;
+}
+
+/*
+ * Profile Line parser.
+ */
+static int AnalyzeLine(char * restrict currentLine, struct ProfileLine * const restrict prfLine, _Bool * restrict MultipleLine)
+{
+  const size_t LineSize       = strlen(currentLine);
+  const uintptr_t MaxMemPoint = (uintptr_t) &currentLine[LineSize-1];
+#ifdef _VERBOSE_
+  printf("\e[31;40mLine : %s\e[0m\n", currentLine);
+#endif
+  /* Set Multiple line to false */
+  *MultipleLine = false;
+  
+  /* Clear result first */
+  memset(prfLine, 0, sizeof(struct ProfileLine)-SUB_COMMAND_MAX_SIZE);
+
+  /* Get Line command */
+  char * Position  = FirstChar(currentLine, MaxMemPoint);
+  prfLine->command = Position;
+  const _Bool isMatrix = (Position[0] == 'M' && Position[1] == 'A') ? true : false;
+  prfLine->isMatrix = isMatrix;
+  
+  /* Get to end of command and replace space by '\0' */
+  while ( *Position != ' ' && (uintptr_t)Position <= MaxMemPoint) ++Position;
+  while ( *Position == ' ' && (uintptr_t)Position <= MaxMemPoint) *Position++ = '\0';
+  if ((uintptr_t) Position == MaxMemPoint) return 1;
+#ifdef _VERBOSE_
+  printf("\t'%s'", prfLine->command);
+#endif
+  if (!isMatrix) {
+    prfLine->subcommand = Position;
+    for (size_t i=0; i<SUB_COMMAND_MAX_SIZE;++i) previousSubCommand[i] = '\0';
+    CleanEndString(currentLine, LineSize);
+#ifdef _VERBOSE_
+    printf("\t\t'%s'\n", prfLine->subcommand);
+#endif
+  } else {
+    if (*Position == '/') {
+      prfLine->subcommand = ++Position;
+      Position = CopySubCommand(previousSubCommand, Position, ':', MaxMemPoint);
+      //Position = GoUptoSymbol(Position, ':', MaxMemPoint);
+    } else {
+#ifdef _VERBOSE_
+    printf(" \e[31;40mMULTIPLE MA LINES DETECTED\e[0m");
+#endif 
+      prfLine->subcommand = previousSubCommand;
+      *MultipleLine = true;
+    }
+#ifdef _VERBOSE_
+    printf("\t\t'%s'\n", prfLine->subcommand);
+#endif
+    //if ((uintptr_t)Position >= MaxMemPoint) return 1; causes bug when line is /MA M:
+    // in any case not needed
+    const size_t counter = CountAndReplaceSymbol(Position, ';', MaxMemPoint);
+#ifdef _VERBOSE_
+    printf("\t\t%lu tags found\n", counter);
+#endif
+    if (counter > 32) return 2;
+    for (size_t i=0; i<counter; ++i) {
+      /* TODO: Avoid checking from the beginning */
+        char * tpos = GoUptoSymbol(Position, '=', MaxMemPoint);
+        if ((uintptr_t) tpos >= MaxMemPoint) {
+          fputs("\nError no = sign detected\n", stderr);
+          //return 3;
+        } else {
+          prfLine->values[i] = tpos;
+	  /* get back to = symbol */
+// 	  while ( *tpos != '\0' && tpos > Position) --tpos;
+	  const char * EqualPosition = tpos - 1;
+	  /* get back to ; symbol */
+          tpos -= 2;
+          while ( *tpos != '\0' && tpos >= Position) --tpos;
+	  ++tpos;
+	  /* trim early space */
+	  while ( *tpos == ' ' && tpos < EqualPosition) ++tpos;
+          prfLine->keywords[i] = tpos;
+        }
+#ifdef _VERBOSE_
+#ifdef _DEBUG_VERBOSE_
+	printf("\t\t\t tag:'%s' @ 0x%8.8x \t\t value:'%s' @ 0x%8.8x\n", prfLine->keywords[i],prfLine->keywords[i], prfLine->values[i], prfLine->values[i]);
+#else
+        printf("\t\t\t tag:'%s' \t\t value:'%s'\n", prfLine->keywords[i], prfLine->values[i] );
+#endif
+#endif
+    }
+    prfLine->counter = counter;
+  }
+  return 0;
+}
+
+/*
+ * The following functions read the score(s) from a given string and set the corresponding
+ * destination(s) with the short integer (16 bit) values read.
+ * Upon error, errno should hold the operating POSIX error.
+ */
+static inline size_t ReadScore(const char * const restrict String, short int * const restrict Score)
+{
+  errno = 0;
+  if (String[0] == '*') {
+    *Score = NLOW;
+    return 0;
+  } else {
+    const long int Lscore =  strtol(String, NULL, 10);
+    if (Lscore < SHRT_MIN || Lscore > SHRT_MAX) {
+	fprintf(stderr, "Profile contains out of bound values for short int : %li\n", Lscore);
+	exit(1);
+    }
+    *Score = (short int) Lscore;
+    return errno;
+  }
+}
+
+static inline size_t ReadScores(const char * const restrict String, short int * const restrict Scores, const size_t count)
+{
+  const char * restrict pos = String;
+
+  errno = 0;
+  if (*pos == '\'') ++pos;
+  for (size_t i=0; i<count; ++i) {
+    if (*pos == '*') {
+      Scores[i] = NLOW;
+      pos += 2;
+    } else {
+      char * newpos;
+      const long int Lscore =  strtol(pos, &newpos, 10);
+      if (Lscore < SHRT_MIN || Lscore > SHRT_MAX) {
+	  fprintf(stderr, "Profile contains out of bound values for short int : %li\n", Lscore);
+	  exit(1);
+      }
+      Scores[i] = (short int) Lscore;
+      if (errno == 0) {
+        while(*newpos != '\0') ++newpos;
+        pos = (const char*) newpos + 1;
+      } else {
+        return 1;
+      }
+    }
+//     if ( count > 1) fprintf(stderr, "%4i ", Scores[i]);
+  }
+//   if ( count > 1) fputs("\n", stderr);
+  return 0;
+}
+
+/*
+ * Exported functions to work on profile structure.
+ */
+int ReadProfile(const char * const restrict FileName, struct Profile * const prf)
+{
+  short int IIPD_ALPHABET       [           ALPHABET_SIZE+2] __attribute__((aligned(16)));
+  short int IIPD_BOUNDARIES     [ INSERTION_BOUNDARIES_SIZE] __attribute__((aligned(16)));
+  short int IMPD_ALPHABET       [           ALPHABET_SIZE+2] __attribute__((aligned(16)));
+  TransitionScores IIPD_TRANSITIONS __attribute__((aligned(16)));
+  
+  char currentLine[PROFILE_MAX_LINE_SIZE] __attribute__((aligned(16)));
+  
+  struct ProfileLine AnalyzedLine;
+
+  union Scores DefaultScores = { 
+    Insertion : { IIPD_ALPHABET,
+		  IIPD_BOUNDARIES,
+		  &IIPD_TRANSITIONS,
+		  0,
+		  0,
+		  0,
+		  IMPD_ALPHABET }
+  };
+  union Scores WorkingScores;
+  
+  size_t Line=0, Alphabet_Length=0, Length=0;
+  int InsertionCounter=-1, MatchCounter=0;
+  int res;
+  _Bool LZCO = false;
+  _Bool MultipleLine;
+
+  char DefaultMatchSymbol;
+  char DefaultInsertionSymbol;
+ 
+  /*
+   * Try to open the file, upon failure emmit error
+   */
+  FILE* prfStream = fopen(FileName,"r");
+  if (prfStream == NULL) {
+    return 1;
+  }
+
+  /*
+   * Clean Profile structure
+   */
+  memset(prf, 0, sizeof(struct Profile));
+  
+  /*
+   * Initialize position-independent profile parameters
+   *
+   *   - general specification
+   */
+  
+  prf->isCircular = false;
+  prf->Length   = 0;
+
+  /*   - disjoint mode */
+  prf->DisjointData.MDIS = 1;
+  strcpy(prf->DisjointData.CDIS[0], "UNIQUE\0");
+  strcpy(prf->DisjointData.CDIS[1], "PROTECT\0");
+  prf->DisjointData.JDIP[0] = 0;
+  prf->DisjointData.JDIP[1] = 2;
+  
+
+  /*   - normalization modes */
+  prf->NormalizationData.JNOR = 0;
+  strcpy(prf->NormalizationData.CNOR[0], "LINEAR\0");
+  strcpy(prf->NormalizationData.CNOR[1], "GLE_ZSCORE\0");
+  strcpy(prf->NormalizationData.CNOR[2], "GLE_ZSCAVE\0");
+  prf->NormalizationData.JNOP[0] = 2;
+  prf->NormalizationData.JNOP[1] = 5;
+  prf->NormalizationData.JNOP[2] = 5;
+
+  for (int i=0; i<MAXN; ++i) {
+      prf->NormalizationData.Values[i].NNOR = i;
+      prf->NormalizationData.Values[i].NNPR = i;
+  }
+
+  /*   - cut-off */
+  prf->CutOffData.JCUT = 0;
+  
+  InitializeDefault(&DefaultScores, &DefaultMatchSymbol, &DefaultInsertionSymbol);
+  
+  memset(previousSubCommand, 0, sizeof(char)*SUB_COMMAND_MAX_SIZE);
+  /*
+   * Read profile
+   */
+  while (!feof(prfStream)) {   
+    GetLine(prfStream, currentLine, 512); ++Line;
+#ifdef _VERBOSE_
+    printf("\e[33;40m\t Match: %i\t\tInsertion: %i\e[0m\n", MatchCounter, InsertionCounter);
+#endif
+
+    if ((res=AnalyzeLine(currentLine, &AnalyzedLine, &MultipleLine)) != 0) {
+      fprintf(stderr,"Error %i in analysis at line %lu\n", res, Line);
+      return 1;
+    }
+    
+    /* Header or matrix */
+    if (!AnalyzedLine.isMatrix)
+    {
+       if ( (AnalyzedLine.command[0] == 'I' && AnalyzedLine.command[1] == 'D' ) ) {
+         char * tpos = CopyUptoSymbol(prf->Identification, AnalyzedLine.subcommand, ';', 64);
+         if (strstr(tpos, "MATRIX") == NULL) goto MissingMatrix ;
+       } else if ( (AnalyzedLine.command[0] == 'A' && AnalyzedLine.command[1] == 'C' ) ) {
+          CopyUptoSymbol(prf->AC_Number, AnalyzedLine.subcommand, ';', 64);
+       } else if ( (AnalyzedLine.command[0] == 'D' && AnalyzedLine.command[1] == 'T' ) ) {
+          strncpy(prf->Date, AnalyzedLine.subcommand, 127);
+       } else if ( (AnalyzedLine.command[0] == 'D' && AnalyzedLine.command[1] == 'E' ) ) {
+          strncpy(prf->Description, AnalyzedLine.subcommand, 255);
+       }
+    }
+    else
+    {
+      /* ----------------------- GENERAL SPECIFICATIONS -------------------------------*/
+      if (strcmp(AnalyzedLine.subcommand, "GENERAL_SPEC")==0) {
+        for (size_t keys=0; keys<AnalyzedLine.counter;++keys) {
+          if        (strcmp(AnalyzedLine.keywords[keys], "ALPHABET")==0) {
+            Alphabet_Length = strlen(AnalyzedLine.values[keys]) - 2;
+            if ( Alphabet_Length > ALPHABET_SIZE ) goto AlphabetSizeTooLarge;
+
+            /* Map all character to unknown set as 0 */
+            memset (prf->Alphabet_Mapping, 0, (ALPHABET_SIZE+1)*sizeof(char));
+            memset (prf->CABC, 'X', (ALPHABET_SIZE+1)*sizeof(char));
+	    prf->CABC[ALPHABET_SIZE+1] = '\0';
+
+            // Update the mapping
+            for (size_t i=1; i<=Alphabet_Length; ++i) {
+              prf->CABC[i] = AnalyzedLine.values[keys][i];
+              const size_t index = (size_t) ((unsigned char) AnalyzedLine.values[keys][i] - (unsigned char) 'A');
+              prf->Alphabet_Mapping[index] = (unsigned char) i;
+            }
+
+            Alphabet_Length = ALPHABET_SIZE;
+            prf->Alphabet_Length = Alphabet_Length;
+            
+          } else if (strcmp(AnalyzedLine.keywords[keys], "LENGTH")==0) {
+            Length = (size_t) atoi(AnalyzedLine.values[keys]);
+            prf->Length = Length;
+            
+            // Allocates memory
+            //if ( AllocateScores(&DefaultScores, Alphabet_Length, Length) != 0 ) goto AllocationError; THIS IS IN THE STACK
+            if ( AllocateScores(&WorkingScores, Alphabet_Length, Length) != 0 ) goto AllocationError;
+
+            /* Copy score pointers to profile */
+            memcpy(&(prf->Scores), &WorkingScores, sizeof(union Scores));
+
+          } else if (strcmp(AnalyzedLine.keywords[keys], "TOPOLOGY")==0) {
+
+          } else if (strcmp(AnalyzedLine.keywords[keys], "LOG_BASE")==0) {
+
+          } else if (strcmp(AnalyzedLine.keywords[keys], "P0")==0) {
+
+          } else if (strcmp(AnalyzedLine.keywords[keys], "P")==0) {
+
+          }
+        }
+      }
+      /* -----------------------      DISJOINT          -------------------------------*/
+      else if (strcmp(AnalyzedLine.subcommand, "DISJOINT")==0) {
+        SDisjoint * const djt = &(prf->DisjointData);
+        /* Set some default in case data is missing */
+        djt->NDIP[0] = 1;
+        djt->NDIP[1] = Length;
+        for (size_t keys=0; keys<AnalyzedLine.counter;++keys) {
+          if        (strcmp(AnalyzedLine.keywords[keys], "DEFINITION")==0) {
+            const char * const tval = AnalyzedLine.values[keys];
+            for (size_t i=0; i<KDIS; ++i) {
+              if ( strcmp(tval, djt->CDIS[i])==0) djt->MDIS = (int) i;
+            }
+          } else if (AnalyzedLine.keywords[keys][0] == 'N' && AnalyzedLine.keywords[keys][1] == '1' ) {
+            djt->NDIP[0] = atoi(AnalyzedLine.values[keys]);
+          } else if (AnalyzedLine.keywords[keys][0] == 'N' && AnalyzedLine.keywords[keys][1] == '2' ) {
+            djt->NDIP[1] = atoi(AnalyzedLine.values[keys]);
+          }
+        }
+      }
+      /* -----------------------   NORMALIZATION        -------------------------------*/
+      else if (strcmp(AnalyzedLine.subcommand, "NORMALIZATION")==0) {
+        SNormalization * const nrm = &(prf->NormalizationData);
+        register const size_t JNOR = nrm->JNOR;
+        if (JNOR >= MAXN) goto TooManyNormalization;
+	register SNormalizationItem * const nrmItem = &(nrm->Values[JNOR]);
+        nrmItem->CNTX[0] = ' ';
+        
+        for (size_t keys=0; keys<AnalyzedLine.counter;++keys) {
+          if        (strcmp(AnalyzedLine.keywords[keys], "FUNCTION")==0) {
+            char ctmp[] = "GRIBSKOV";
+            if (strcmp(AnalyzedLine.values[keys], "GRIBSKOV") == 0)
+              AnalyzedLine.values[keys] = ctmp;
+
+            int index = -1;
+            for (int i=0; i<KNOR; ++i) {
+              if (strcmp(AnalyzedLine.values[keys], nrm->CNOR[i])==0) index = i;
+            }
+            if ( index < 0 ) goto NormalizationError;
+            nrmItem->MNOR = index;
+
+          } else if (strcmp(AnalyzedLine.keywords[keys], "MODE")==0) {
+            nrmItem->NNOR = atoi(AnalyzedLine.values[keys]);
+          } else if (strcmp(AnalyzedLine.keywords[keys], "PRIORITY")==0) {
+            nrmItem->NNPR = atoi(AnalyzedLine.values[keys]);
+          } else if (strcmp(AnalyzedLine.keywords[keys], "TEXT")==0) {
+            strncpy(nrmItem->CNTX, AnalyzedLine.values[keys], 32);
+          } else {
+            if ( AnalyzedLine.keywords[keys][0] == 'R') {
+              // get the number
+              const size_t index = (size_t) ( (unsigned char) AnalyzedLine.keywords[keys][1] - (unsigned char) '1');
+	      if (index >= 5) {
+		fprintf(stderr, "Normalization R index out of bound (%lu).\n", index);
+		return 1;
+	      }
+              nrmItem->RNOP[index] = (float) atof(AnalyzedLine.values[keys]);
+            }
+          }
+        }
+        nrm->JNOR = JNOR + 1;
+      }
+      /* -----------------------        CUTOFF          -------------------------------*/
+      else if (strcmp(AnalyzedLine.subcommand, "CUT_OFF")==0) {
+        register SCutOff * const ct = &(prf->CutOffData);
+        register const size_t JCUT = (size_t) ct->JCUT;
+        if (JCUT >= MAXC) goto TooManyCutOff;
+	register SCutOffItem * const restrict ctItem = &(ct->Values[JCUT]);
+
+        for (size_t keys=0; keys<AnalyzedLine.counter;++keys) {
+          if        (strcmp(AnalyzedLine.keywords[keys], "LEVEL")==0) {
+            register const int itmp = atoi(AnalyzedLine.values[keys]);
+            ctItem->MCLE = itmp;
+            if (itmp == 0 ) LZCO = true;
+          } else if (strcmp(AnalyzedLine.keywords[keys], "SCORE")==0) {
+            ctItem->ICUT = atoi(AnalyzedLine.values[keys]);
+          } else if (strcmp(AnalyzedLine.keywords[keys], "H_SCORE")==0) {
+            ctItem->HCUT = (unsigned int) atoi(AnalyzedLine.values[keys]);
+          } else if (strcmp(AnalyzedLine.keywords[keys], "TEXT")==0) {
+            strncpy(ctItem->CCUT, AnalyzedLine.values[keys], 32);
+          } else if (strcmp(AnalyzedLine.keywords[keys], "N_SCORE")==0) {
+            const char * pos = AnalyzedLine.values[keys];
+            const uintptr_t MaxMemory = (uintptr_t) pos + strlen(pos);
+            const size_t count = 1 + CountAndReplaceSymbol(AnalyzedLine.values[keys], ',', MaxMemory);
+            if (count > MAXN) goto TooManyScores;
+            
+            for (size_t i=0; i<count; ++i) {
+              char * newpos;
+              ctItem->RCUT[i] = strtof(pos, &newpos);
+	      if (newpos == pos || newpos == 0) {
+		fputs("Unable to read N_SCORE values\n" , stderr);
+		return 1;
+	      }
+              while(*newpos != '\0') ++newpos;
+              pos = newpos + 1; 
+            }
+            ctItem->JCNM = (int) count;
+          } else if (strcmp(AnalyzedLine.keywords[keys], "MODE")==0) {
+            const char * pos = AnalyzedLine.values[keys];
+            const uintptr_t MaxMemory = (uintptr_t) pos + strlen(pos);
+            const size_t count = 1 + CountAndReplaceSymbol(AnalyzedLine.values[keys], ',', MaxMemory);
+            if (count > MAXN) goto TooManyModes;
+
+            for (size_t i=0; i<count; ++i) {
+              char * newpos;
+              ctItem->MCUT[i] = (int) strtol(pos, &newpos, 10);
+              while(*newpos != '\0') ++newpos;
+              pos = newpos + 1;
+            }
+          }
+        }
+        ct->JCUT = JCUT + 1;
+      }
+      /* -----------------------       DEFAULT          -------------------------------*/
+      else if (strcmp(AnalyzedLine.subcommand, "DEFAULT")==0) {
+        if (AnalyzedLine.counter == 0) {
+          InitializeDefault(&DefaultScores, &DefaultMatchSymbol, &DefaultInsertionSymbol);
+        } else {
+          for (size_t keys=0; keys<AnalyzedLine.counter;++keys) {
+            const char * key = AnalyzedLine.keywords[keys];
+	    if ( key[0] == 'S' && key[1] == 'Y') {
+	      if (key[3] == 'M') {
+		DefaultMatchSymbol = AnalyzedLine.values[keys][1];
+	      } 
+	      else if (key[3] == 'I') {
+		DefaultInsertionSymbol = AnalyzedLine.values[keys][1];
+	      }
+	    }
+            else if ( key[0] == 'M' && key[1] == '0' ) {
+              if ( ReadScore(AnalyzedLine.values[keys], &(DefaultScores.Match.Alphabet[0])) != 0 ) goto ReadError;
+            } else if ( key[0] == 'M' && key[1] == '\0' ) {
+              const char * pos = AnalyzedLine.values[keys];
+              const uintptr_t MaxMemory = (uintptr_t) pos + strlen(pos);
+              const size_t count = CountAndReplaceSymbol(AnalyzedLine.values[keys], ',', MaxMemory) + 1;
+              if (count == 1) {
+                short int data;
+                if ( ReadScore(AnalyzedLine.values[keys], &data) != 0 ) goto ReadError;
+                for (size_t i=0; i<Alphabet_Length; ++i) DefaultScores.Match.Alphabet[i+1] = data;
+              } else {
+                if ( ReadScores(AnalyzedLine.values[keys], &(DefaultScores.Match.Alphabet[1]), count) != 0 ) goto ReadError;
+              }
+            } else if ( key[0] == 'D' && key[1] == '\0' ) {
+              if ( ReadScore(AnalyzedLine.values[keys], &(DefaultScores.Match.Alphabet[Alphabet_Length+1])) != 0 ) goto ReadError;
+            }
+            else {
+              short int *ptr;
+              const size_t type = GetInsertionMemory(key, &DefaultScores.Insertion, &ptr);
+              switch (type){
+                case (0):
+                  if ( ReadScore(AnalyzedLine.values[keys], ptr) != 0 ) goto ReadError;
+                  break;
+                case (1):
+                  {
+                    const char * pos = AnalyzedLine.values[keys];
+                    const uintptr_t MaxMemory = (uintptr_t) pos + strlen(pos);
+                    const size_t count = CountAndReplaceSymbol(AnalyzedLine.values[keys], ',', MaxMemory) + 1;
+                    if (count == 1) {
+                      short int data;
+                      if ( ReadScore(AnalyzedLine.values[keys], &data) != 0 ) goto ReadError;
+                      for (size_t i=0; i<Alphabet_Length; ++i) ptr[i] = data;
+                    } else {
+                      if ( ReadScores(AnalyzedLine.values[keys], ptr, count) != 0 ) goto ReadError;
+                    }
+                  }
+                  break;
+                default:
+                  goto UnknownKey;
+              }
+            }
+          }
+        }
+      }
+      /* -----------------------        INSERTIONS      -------------------------------*/
+      else if (AnalyzedLine.subcommand[0] == 'I') {
+	if (MultipleLine) {
+	  --InsertionCounter;
+	  PreviousInsertionProfile(&WorkingScores.Insertion);
+	} else {
+	  /* Copy default values */
+	  memcpy(WorkingScores.Insertion.Alphabet,    DefaultScores.Insertion.Alphabet,    (Alphabet_Length+2)*sizeof(short int));
+	  memcpy(WorkingScores.Insertion.Boundaries,  DefaultScores.Insertion.Boundaries,  (INSERTION_BOUNDARIES_SIZE)*sizeof(short int));
+	  memcpy(WorkingScores.Insertion.Transitions, DefaultScores.Insertion.Transitions, sizeof(TransitionScores));
+	}
+        /* Check whether there is an implicit /M:, if so insert it */
+        if (MatchCounter < InsertionCounter + 1) {
+//           fprintf(stderr, "Line %lu : implicit Match : %lu < %lu\n", Line, MatchCounter, InsertionCounter);
+#ifdef _VERBOSE_
+	  puts(" \e[0;32m IMPLICIT INSERTION OF M\e[0m\n");
+#endif
+          memcpy(WorkingScores.Match.Alphabet, DefaultScores.Match.Alphabet, (Alphabet_Length+2)*sizeof(short int));
+          NextMatchProfile(&WorkingScores.Match);
+          ++MatchCounter;
+        }
+
+        /* Read the scores */
+        for (size_t keys=0; keys<AnalyzedLine.counter;++keys) {
+          const char * key = AnalyzedLine.keywords[keys];
+          short int *ptr;
+          const size_t type = GetInsertionMemory(key, &WorkingScores.Insertion, &ptr);
+          switch (type){
+            case (0):
+              if ( ReadScore(AnalyzedLine.values[keys], ptr) != 0 ) goto ReadError;
+              break;
+            case (1):
+              {
+                const char * pos = AnalyzedLine.values[keys];
+                const uintptr_t MaxMemory = (uintptr_t) pos + strlen(pos);
+                const size_t count = CountAndReplaceSymbol(AnalyzedLine.values[keys], ',', MaxMemory) + 1;
+                if (count == 1) {
+                  short int data;
+                  if ( ReadScore(AnalyzedLine.values[keys], &data) != 0 ) goto ReadError;
+                  for (size_t i=0; i<Alphabet_Length; ++i) ptr[i] = data;
+                } else {
+                  if ( ReadScores(AnalyzedLine.values[keys], ptr, count) != 0 ) goto ReadError;
+                }
+              }
+              break;
+            default:
+              goto UnknownKey;
+          }
+        }
+
+        /* Increment I counter */
+        NextInsertionProfile(&WorkingScores.Insertion);
+        ++InsertionCounter;
+      }
+      /* -----------------------         MATCHES       --------------------------------*/
+      else if (AnalyzedLine.subcommand[0] == 'M') {
+	if (MultipleLine) {
+	  --MatchCounter;
+	  PreviousMatchProfile(&WorkingScores.Match);
+	} else {
+	  /* Copy default values */
+	  memcpy(WorkingScores.Match.Alphabet, DefaultScores.Match.Alphabet, (Alphabet_Length+2)*sizeof(short int));
+	}
+        /* Check whether there is an implicit /I:, if so insert it */
+        if (InsertionCounter < MatchCounter ) {
+//           fprintf(stderr, "Line %lu : implicit Insertion : %lu <= %lu\n", Line, InsertionCounter, MatchCounter);
+#ifdef _VERBOSE_
+	  puts(" \e[0;32m IMPLICIT INSERTION OF I\e[0m\n");
+#endif
+	  memcpy(WorkingScores.Insertion.Alphabet,    DefaultScores.Insertion.Alphabet,    (Alphabet_Length+2)*sizeof(short int));
+	  memcpy(WorkingScores.Insertion.Boundaries,  DefaultScores.Insertion.Boundaries,  (INSERTION_BOUNDARIES_SIZE)*sizeof(short int));
+	  memcpy(WorkingScores.Insertion.Transitions, DefaultScores.Insertion.Transitions, sizeof(TransitionScores));
+
+//        CopyPreviousInsertionProfile(&WorkingScores.Insertion);
+	  
+	  NextInsertionProfile(&WorkingScores.Insertion);
+          ++InsertionCounter;
+        }
+
+        /* Read the scores */
+        for (size_t keys=0; keys<AnalyzedLine.counter;++keys) {
+          const char * key = AnalyzedLine.keywords[keys];
+          if ( key[0] == 'M' && key[1] == '0' ) {
+              if ( ReadScore(AnalyzedLine.values[keys], &(WorkingScores.Match.Alphabet[0])) != 0 ) goto ReadError;
+          } else if ( key[0] == 'M' && key[1] == '\0' ) {
+            const char * pos = AnalyzedLine.values[keys];
+            const uintptr_t MaxMemory = (uintptr_t) pos + strlen(pos);
+            const size_t count = CountAndReplaceSymbol(AnalyzedLine.values[keys], ',', MaxMemory) + 1;
+            if (count == 1) {
+              short int data;
+              if ( ReadScore(AnalyzedLine.values[keys], &data) != 0 ) goto ReadError;
+              for (size_t i=0; i<Alphabet_Length; ++i) WorkingScores.Match.Alphabet[i+1] = data;
+            } else {
+              if ( ReadScores(AnalyzedLine.values[keys], &(WorkingScores.Match.Alphabet[1]), count) != 0 ) goto ReadError;
+            }
+          } else if ( key[0] == 'D' && key[1] == '\0' ) {
+            if ( ReadScore(AnalyzedLine.values[keys], &WorkingScores.Match.Alphabet[Alphabet_Length+1]) != 0 ) goto ReadError;
+          }
+        }
+
+        /* Increment M counter */
+        NextMatchProfile(&WorkingScores.Match);
+        ++MatchCounter;
+      }
+      /* -----------------------       UNKNOWN          -------------------------------*/
+      else {
+
+      }
+    }
+  }
+  
+  /* Insert possible missing I when profile starts with M */
+  if (InsertionCounter == Length-1 ) {
+    /* Copy default values */
+    memcpy(WorkingScores.Insertion.Alphabet, DefaultScores.Insertion.Alphabet, (Alphabet_Length+2)*sizeof(short int));
+    memcpy(WorkingScores.Insertion.Boundaries,  DefaultScores.Insertion.Boundaries,  (INSERTION_BOUNDARIES_SIZE)*sizeof(short int));
+    memcpy(WorkingScores.Insertion.Transitions, DefaultScores.Insertion.Transitions, sizeof(TransitionScores));
+    ++ InsertionCounter;
+  }
+
+  /*
+   * Operate on the Insertion Score matrix to place boundaries scores within the structure at
+   * location reserved for them.
+   * NOTE: This was initially the IIPX matrix filled up within pfsearch.
+   */
+  /*
+     IIPX( XM,I1) = MAX(MLOW,IIPP( B1,I1) + IIPP( BM,I1))
+     IIPX( XI,I1) = MAX(MLOW,IIPP( B1,I1) + IIPP( BI,I1))
+     IIPX( XD,I1) = MAX(MLOW,IIPP( B1,I1) + IIPP( BD,I1))
+
+     IIPX( YM,I1) = MAX(MLOW,IIPP( B0,I1) + IIPP( BM,I1))
+     IIPX( YI,I1) = MAX(MLOW,IIPP( B0,I1) + IIPP( BI,I1))
+     IIPX( YD,I1) = MAX(MLOW,IIPP( B0,I1) + IIPP( BD,I1))
+
+     IIPX( MX,I1) = MAX(MLOW,IIPP( E1,I1) + IIPP( ME,I1))
+     IIPX( IX,I1) = MAX(MLOW,IIPP( E1,I1) + IIPP( IE,I1))
+     IIPX( DX,I1) = MAX(MLOW,IIPP( E1,I1) + IIPP( DE,I1))
+
+     IIPX( MY,I1) = MAX(MLOW,IIPP( E0,I1) + IIPP( ME,I1))
+     IIPX( IY,I1) = MAX(MLOW,IIPP( E0,I1) + IIPP( IE,I1))
+     IIPX( DY,I1) = MAX(MLOW,IIPP( E0,I1) + IIPP( DE,I1))
+  */
+  {
+    #define MAXMLOW(a) (short int) ( (a>MLOW) ? a : MLOW )
+    #define CHECK_AND_SET(a,b,c) {\
+      const int Lscore = ((int) b ) + ((int) c);\
+      if (Lscore < SHRT_MIN || Lscore > SHRT_MAX) {\
+	fprintf(stderr, "Profile contains out of bound values for short int : %i\n"\
+	                " arising from the addition of %i with %i\n", Lscore, (int)b, (int)c);\
+	exit(1);\
+      } else {\
+	a = (short int) ( (Lscore > MLOW) ? Lscore : MLOW );\
+      }\
+    }
+    register const short int * restrict const InsertionBoundaries = prf->Scores.Insertion.Boundaries;
+    register short int * restrict const InsertionScores           = prf->Scores.Insertion.Transitions->Element;
+    register ScoreTuple * restrict const FirstScores              = prf->Scores.Insertion.FirstSequenceProtein;
+    register ScoreTuple * restrict const LastScores               = prf->Scores.Insertion.LastSequenceProtein;
+    register const short int MLOW = NLOW/4*3;
+
+    if ( prf->isCircular) {
+      for (size_t i=0; i<=Length; ++i) {
+        register const size_t offset  = INSERTION_TRANSITIONS_SIZE*i;
+        register const size_t Boffset = INSERTION_BOUNDARIES_SIZE*i;
+/*
+  WARNING: POTENTIAL ISSUE WITH _MX or _MY
+  */
+        CHECK_AND_SET(InsertionScores[offset + _XM], InsertionBoundaries[Boffset + _B1], InsertionBoundaries[Boffset + _BM]);
+        CHECK_AND_SET(InsertionScores[offset + _XI], InsertionBoundaries[Boffset + _B1], InsertionBoundaries[Boffset + _BI]);
+        CHECK_AND_SET(InsertionScores[offset + _XD], InsertionBoundaries[Boffset + _B1], InsertionBoundaries[Boffset + _BD]);
+        
+        // Minimize dummy element 
+        InsertionScores[offset + _DUMMY] = NLOW;
+        CHECK_AND_SET(InsertionScores[offset + _MX], InsertionBoundaries[Boffset + _E0], InsertionBoundaries[Boffset + _ME]);
+        CHECK_AND_SET(InsertionScores[offset + _IX], InsertionBoundaries[Boffset + _E0], InsertionBoundaries[Boffset + _IE]);
+        CHECK_AND_SET(InsertionScores[offset + _DX], InsertionBoundaries[Boffset + _E0], InsertionBoundaries[Boffset + _DE]);
+       
+	CHECK_AND_SET(FirstScores[i].To[MATCH]    , InsertionBoundaries[Boffset + _B0], InsertionBoundaries[Boffset + _BM]);
+        CHECK_AND_SET(FirstScores[i].To[INSERTION], InsertionBoundaries[Boffset + _B0], InsertionBoundaries[Boffset + _BI]);
+        CHECK_AND_SET(FirstScores[i].To[DELETION] , InsertionBoundaries[Boffset + _B0], InsertionBoundaries[Boffset + _BD]);
+
+        CHECK_AND_SET(LastScores[i].From[MATCH]    , InsertionBoundaries[Boffset + _E1], InsertionBoundaries[Boffset + _ME]);
+        CHECK_AND_SET(LastScores[i].From[INSERTION], InsertionBoundaries[Boffset + _E1], InsertionBoundaries[Boffset + _IE]);
+        CHECK_AND_SET(LastScores[i].From[DELETION] , InsertionBoundaries[Boffset + _E1], InsertionBoundaries[Boffset + _DE]);
+      }
+    } else {
+      const size_t NDIP1 = prf->DisjointData.NDIP[0];
+      const size_t NDIP2 = prf->DisjointData.NDIP[1];
+      
+      for (size_t i=0; i<NDIP1; ++i) {
+        register const size_t offset  = INSERTION_TRANSITIONS_SIZE*i;
+        register const size_t Boffset = INSERTION_BOUNDARIES_SIZE*i;
+
+        CHECK_AND_SET(InsertionScores[offset + _XM], InsertionBoundaries[Boffset + _B1], InsertionBoundaries[Boffset + _BM]);
+        CHECK_AND_SET(InsertionScores[offset + _XI], InsertionBoundaries[Boffset + _B1], InsertionBoundaries[Boffset + _BI]);
+        CHECK_AND_SET(InsertionScores[offset + _XD], InsertionBoundaries[Boffset + _B1], InsertionBoundaries[Boffset + _BD]);
+        
+        // Minimize dummy element 
+        InsertionScores[offset + _DUMMY] = NLOW;
+        CHECK_AND_SET(InsertionScores[offset + _MX], NLOW, InsertionBoundaries[Boffset + _ME]);
+        CHECK_AND_SET(InsertionScores[offset + _IX], NLOW, InsertionBoundaries[Boffset + _IE]);
+        CHECK_AND_SET(InsertionScores[offset + _DX], NLOW, InsertionBoundaries[Boffset + _DE]);
+
+	CHECK_AND_SET(FirstScores[i].To[MATCH]    , InsertionBoundaries[Boffset + _B0], InsertionBoundaries[Boffset + _BM]);
+        CHECK_AND_SET(FirstScores[i].To[INSERTION], InsertionBoundaries[Boffset + _B0], InsertionBoundaries[Boffset + _BI]);
+        CHECK_AND_SET(FirstScores[i].To[DELETION] , InsertionBoundaries[Boffset + _B0], InsertionBoundaries[Boffset + _BD]);
+
+        CHECK_AND_SET(LastScores[i].From[MATCH]    , (short int)NLOW, InsertionBoundaries[Boffset + _ME]);
+        CHECK_AND_SET(LastScores[i].From[INSERTION], (short int)NLOW, InsertionBoundaries[Boffset + _IE]);
+        CHECK_AND_SET(LastScores[i].From[DELETION] , (short int)NLOW, InsertionBoundaries[Boffset + _DE]);
+      }
+      for (size_t i=NDIP1; i<NDIP2; ++i) {
+        register const size_t offset  = INSERTION_TRANSITIONS_SIZE*i;
+        register const size_t Boffset = INSERTION_BOUNDARIES_SIZE*i;
+
+        CHECK_AND_SET(InsertionScores[offset + _XM], InsertionBoundaries[Boffset + _B1], InsertionBoundaries[Boffset + _BM]);
+        CHECK_AND_SET(InsertionScores[offset + _XI], InsertionBoundaries[Boffset + _B1], InsertionBoundaries[Boffset + _BI]);
+        CHECK_AND_SET(InsertionScores[offset + _XD], InsertionBoundaries[Boffset + _B1], InsertionBoundaries[Boffset + _BD]);
+        
+        // Minimize dummy element 
+        InsertionScores[offset + _DUMMY] = NLOW;
+        CHECK_AND_SET(InsertionScores[offset + _MX], InsertionBoundaries[Boffset + _E1], InsertionBoundaries[Boffset + _ME]);
+        CHECK_AND_SET(InsertionScores[offset + _IX], InsertionBoundaries[Boffset + _E1], InsertionBoundaries[Boffset + _IE]);
+        CHECK_AND_SET(InsertionScores[offset + _DX], InsertionBoundaries[Boffset + _E1], InsertionBoundaries[Boffset + _DE]);
+
+        CHECK_AND_SET(FirstScores[i].To[MATCH]    , InsertionBoundaries[Boffset + _B0], InsertionBoundaries[Boffset + _BM]);
+        CHECK_AND_SET(FirstScores[i].To[INSERTION], InsertionBoundaries[Boffset + _B0], InsertionBoundaries[Boffset + _BI]);
+        CHECK_AND_SET(FirstScores[i].To[DELETION] , InsertionBoundaries[Boffset + _B0], InsertionBoundaries[Boffset + _BD]);
+
+        CHECK_AND_SET(LastScores[i].From[MATCH]    , InsertionBoundaries[Boffset + _E0], InsertionBoundaries[Boffset + _ME]);
+        CHECK_AND_SET(LastScores[i].From[INSERTION], InsertionBoundaries[Boffset + _E0], InsertionBoundaries[Boffset + _IE]);
+        CHECK_AND_SET(LastScores[i].From[DELETION] , InsertionBoundaries[Boffset + _E0], InsertionBoundaries[Boffset + _DE]);
+      }
+      for (size_t i=NDIP2; i<=Length; ++i) {
+        register const size_t offset  = INSERTION_TRANSITIONS_SIZE*i;
+        register const size_t Boffset = INSERTION_BOUNDARIES_SIZE*i;
+
+        CHECK_AND_SET(InsertionScores[offset + _XM], NLOW, InsertionBoundaries[Boffset + _BM]);
+        CHECK_AND_SET(InsertionScores[offset + _XI], NLOW, InsertionBoundaries[Boffset + _BI]);
+        CHECK_AND_SET(InsertionScores[offset + _XD], NLOW, InsertionBoundaries[Boffset + _BD]);
+        
+        // Minimize dummy element 
+        InsertionScores[offset + _DUMMY] = NLOW;
+        CHECK_AND_SET(InsertionScores[offset + _MX], InsertionBoundaries[Boffset + _E1], InsertionBoundaries[Boffset + _ME]);
+        CHECK_AND_SET(InsertionScores[offset + _IX], InsertionBoundaries[Boffset + _E1], InsertionBoundaries[Boffset + _IE]);
+        CHECK_AND_SET(InsertionScores[offset + _DX], InsertionBoundaries[Boffset + _E1], InsertionBoundaries[Boffset + _DE]);
+
+        CHECK_AND_SET(FirstScores[i].To[MATCH]    , (short int)NLOW, InsertionBoundaries[Boffset + _BM]);
+        CHECK_AND_SET(FirstScores[i].To[INSERTION], (short int)NLOW, InsertionBoundaries[Boffset + _BI]);
+        CHECK_AND_SET(FirstScores[i].To[DELETION] , (short int)NLOW, InsertionBoundaries[Boffset + _BD]);
+
+        CHECK_AND_SET(LastScores[i].From[MATCH]    , InsertionBoundaries[Boffset + _E0], InsertionBoundaries[Boffset + _ME]);
+        CHECK_AND_SET(LastScores[i].From[INSERTION], InsertionBoundaries[Boffset + _E0], InsertionBoundaries[Boffset + _IE]);
+        CHECK_AND_SET(LastScores[i].From[DELETION] , InsertionBoundaries[Boffset + _E0], InsertionBoundaries[Boffset + _DE]);
+      }
+    }
+    #undef CHECK_AND_SET
+    #undef MAXMLOW
+  }
+
+  /* Insert possible missing M line at last */
+  if (MatchCounter == Length) {
+    /* Copy default values */
+    memcpy(WorkingScores.Match.Alphabet, DefaultScores.Match.Alphabet, (Alphabet_Length+2)*sizeof(short int));
+  }
+  
+  /* CHECK CONSISTENCY */
+  if (MatchCounter != Length) {
+     if ( MatchCounter < Length )
+      fprintf(stderr, "There is not enough match lines %i <> %lu\n", MatchCounter, Length );
+     else
+      fprintf(stderr, "There is too many match lines with profile %i <> %lu\n", MatchCounter, Length );
+     return 1;
+  }
+  if (InsertionCounter != Length) {
+     if ( InsertionCounter < Length )
+      fprintf(stderr, "There is not enough insertion lines %i <> %lu\n", InsertionCounter, Length );
+     else
+      fprintf(stderr, "There is too many insertion lines with profile %i <> %lu\n", InsertionCounter, Length );
+     return 1;
+  }
+
+  if (LZCO != true || prf->CutOffData.JCUT == 0) {
+      fprintf(stderr, "No level 0 CUT-OFF data block in profile.\n");
+      return 1;
+  }
+
+  if (Length < 1) {
+    fprintf(stderr, "Unexpected end of profile. Profile has zero length.\n");
+    return 1;
+  }
+
+  if (prf->DisjointData.NDIP[0] <= 0 || prf->DisjointData.NDIP[0] > Length) {
+    fprintf(stderr,
+            "Warning: Disjointness parameter 1 (%i) out of bound. Parameter set to acceptable value.\n",
+            prf->DisjointData.NDIP[0]);
+    prf->DisjointData.NDIP[0] = 1;
+  }
+  if (prf->DisjointData.NDIP[1] <= 0 || prf->DisjointData.NDIP[1] > Length) {
+    fprintf(stderr,
+            "Warning: Disjointness parameter 2 (%i) out of bound. Parameter set to acceptable value.\n",
+            prf->DisjointData.NDIP[1]);
+    prf->DisjointData.NDIP[1] = Length;    
+  }
+
+  if (prf->DisjointData.NDIP[1] < prf->DisjointData.NDIP[0]) {
+    const int tmp = prf->DisjointData.NDIP[1];
+    prf->DisjointData.NDIP[1] = prf->DisjointData.NDIP[0];
+    prf->DisjointData.NDIP[0] = tmp;
+  }
+  
+  return 0;
+  
+  /*
+   * ERRORS
+   */
+  
+// MissingSymbol:
+//    fprintf(stderr, "Missing symbol %c at line %lu of %s\n\tLine: %s\n",Symbol,Line, FileName, prfLine);
+//    return 1;
+   
+MissingMatrix:
+   if (prf->Identification[0] != '\0') {
+    fprintf(stderr, "Missing MATRIX keyword at line %lu of profile %s\n\tLine: %s\n", Line, prf->Identification, currentLine);
+   } else {
+    fprintf(stderr, "Missing MATRIX keyword at line %lu of %s\n\tLine: %s\n", Line, FileName, currentLine);
+   }
+   return 1;
+   
+AlphabetSizeTooLarge:
+   fprintf(stderr, "Alphabet size exceeds hard defined size: %u > %lu\n", ALPHABET_SIZE, prf->Alphabet_Length);
+   return 1;
+
+NormalizationError:
+  fprintf(stderr, "Error within normalization section at line %lu of %s\nFUNCTION value matches none of the following.\n",
+          Line, FileName);
+  for (int i=0; i<KNOR; ++i) fprintf(stderr, "%s ", prf->NormalizationData.CNOR[i]);
+  fputs("\n", stderr);
+  
+  return 1;
+    
+TooManyNormalization:
+  fprintf(stderr, "Too many normalization parameters at line %lu of %s\n\tMaximum is %i.\n", Line, FileName, 0);
+   return 1;
+
+TooManyCutOff:
+  fprintf(stderr, "Too many cutoffs parameters at line %lu of %s\n\tMaximum is %i.\n", Line, FileName, 0);
+   return 1;
+
+TooManyModes:
+   fprintf(stderr, "Too many modes parameters at line %lu of %s\n\tMaximum is %i.\n", Line, FileName, 0);
+   return 1;
+
+TooManyScores:
+   fprintf(stderr, "Too many scores at line %lu of %s\n\tMaximum is %i.\n", Line, FileName, 0);
+   return 1;
+
+ReadError:
+   fprintf(stderr, "Error reading one parameter at line %lu of %s\n\tLine: %s\n", Line, FileName, currentLine);
+   return 1;
+
+UnknownKey:
+   fprintf(stderr, "Unknown keyword found at line %lu of %s\n\tLine: %s\n", Line, FileName, currentLine);
+   return 1;
+
+AllocationError:
+  fprintf(stderr, "Unable to allocate sufficient memory\n");
+  return 1;
+   
+}
+
+void FreeProfile(struct Profile * const prf)
+{
+  FreeScores(&(prf->Scores));
+  memset(prf, 0, sizeof(struct Profile));
+}
+
+#ifdef _TEST
+/* default value for header is 4 digits*/
+// #define INT_FORMAT "%4i"
+// #define NLOW_FORMAT "NLOW"
+// #define MLOW_FORMAT "MLOW"
+// #define SPACE "  "
+//#define LINE "-----"
+
+#define INT_FORMAT "%6i"
+#define NLOW_FORMAT "  NLOW"
+#define MLOW_FORMAT "  MLOW"
+#define SPACE "    "
+#define LINE "-------"
+int main(int argc, char *argv[])
+{
+  struct Profile prf;
+
+  if (argc < 2 ) {
+     fputs("Give at least a profile file name\n" , stderr);
+     return 1;
+  }
+  if (ReadProfile(argv[1], &prf) != 0) {
+    FreeProfile(&prf);
+    return 1;
+  }
+  if (argc > 2) return 0;
+  struct SMatch Match= prf.Scores.Match;
+
+  puts("Alphabet Mapping");
+  for (size_t i=0; i<ALPHABET_SIZE; ++i) {
+    printf("Map %c=%2u\t", (char) ((unsigned char) 'A' + (unsigned char) i), (unsigned int) prf.Alphabet_Mapping[i]);
+    if ((i+1) % 8 == 0 ) puts("");
+  }
+  puts("\n");
+  const size_t prfLength = prf.Length + 1;
+  
+  printf("Match matrix with alignment %lu\n\n",Match.AlignStep );
+  printf("    | ");
+  for (size_t alpha=0; alpha<prf.Alphabet_Length+2; ++alpha) {
+    printf(SPACE "%2lu ", alpha);
+  }
+  fputs("\n", stdout);
+  printf("    | ");
+  for (size_t alpha=0; alpha<prf.Alphabet_Length+2; ++alpha) {
+    fputs(LINE, stdout);
+  }
+  fputs("\n", stdout);
+  
+  for (size_t iprf=0; iprf<prfLength; ++iprf) {
+    const short int * MatchLine = &Match.Alphabet[iprf*Match.AlignStep];
+    printf("%3lu | ", iprf+1);
+    for (size_t alpha=0; alpha<prf.Alphabet_Length+2; ++alpha) {
+      if (MatchLine[alpha] == NLOW) {
+        printf(NLOW_FORMAT " ");
+      } else {
+        printf(INT_FORMAT " ", MatchLine[alpha]);
+      }
+    }
+    fputs("\n", stdout);
+  }
+
+//   puts("Transpose Match matrix");
+//   const int * TIMatch = TransposeAndConvertMatchMatrix(&(prf.Scores.Match), prf.Alphabet_Length, prf.Length);
+//   const int * MatchLine = TIMatch;
+//   const size_t Aligned_Profile_Length = (prfLength+1 + 15) & ~15;
+//   for (size_t alpha=0; alpha<prf.Alphabet_Length; ++alpha) {
+//       printf("%3lu | ", alpha);
+//       for (size_t iprf=0; iprf<prfLength; ++iprf) {
+// 	if (MatchLine[iprf] == NLOW) {
+// 	  printf("NLOW ");
+// 	} else {
+// 	  printf("%4i ", MatchLine[iprf]);
+// 	}
+//       }
+//       fputs("\n", stdout);
+//       MatchLine += Aligned_Profile_Length;
+//   }
+  
+  struct SInsertion Insertion= prf.Scores.Insertion;
+  printf("\nInsertion alphabet matrix with alignment %lu\n\n",Insertion.AlignStep );
+  printf("    | ");
+  for (size_t alpha=0; alpha<prf.Alphabet_Length+2; ++alpha) {
+    printf(SPACE "%2lu ", alpha);
+  }
+  fputs("\n", stdout);
+  printf("    | ");
+  for (size_t alpha=0; alpha<prf.Alphabet_Length+2; ++alpha) {
+    fputs(LINE, stdout);
+  }
+  fputs("\n", stdout);
+
+  for (size_t iprf=0; iprf<prfLength; ++iprf) {
+    short int * InsertionLine = &Insertion.Alphabet[iprf*Insertion.AlignStep];
+    printf("%3lu | ", iprf+1);
+    for (size_t alpha=0; alpha<prf.Alphabet_Length+2; ++alpha) {
+      if (InsertionLine[alpha] == NLOW) {
+        printf(NLOW_FORMAT " ");
+      } else {
+        printf(INT_FORMAT " ", InsertionLine[alpha]);
+      }
+    }
+    fputs("\n", stdout);
+  }
+
+  printf("\nInsertion boundaries matrix with alignment %i\n\n", INSERTION_BOUNDARIES_SIZE );
+  char Header[] = "     " SPACE "_B0" SPACE "_B1" SPACE "_E0" SPACE "_E1" SPACE "_BM" SPACE "_BI" SPACE "_BD" SPACE "_BE" SPACE "_ME" SPACE "_IE" SPACE "_DE\n";
+  
+  fputs(Header, stdout);
+  fputs("    |", stdout);
+  for (size_t i=0; i<strlen(Header)-5; ++i) fputc('-', stdout);
+  fputs("\n", stdout);
+  for (size_t iprf=0; iprf<prfLength; ++iprf) {
+    short int * InsertionLine = &Insertion.Boundaries[iprf*INSERTION_BOUNDARIES_SIZE];
+    printf("%3lu | ", iprf+1);
+    for (size_t alpha=0; alpha<INSERTION_BOUNDARIES_SIZE; ++alpha) {
+      if (InsertionLine[alpha] == NLOW) {
+        printf(NLOW_FORMAT " ");
+      } else {
+        printf(INT_FORMAT " ", InsertionLine[alpha]);
+      }
+    }
+    fputs("\n", stdout);
+  }
+
+
+  const TransitionScores * restrict InsertionLine = prf.Scores.Insertion.Transitions;
+  const ScoreTuple * const restrict FirstSeq      = prf.Scores.Insertion.FirstSequenceProtein;
+  const ScoreTuple * const restrict LastSeq       = prf.Scores.Insertion.LastSequenceProtein;
+  
+#define PRINT_VALUE(x) { \
+  if (x == NLOW) {\
+    printf(NLOW_FORMAT " ");\
+  } else if ( x == NLOW/4*3) {\
+    printf(MLOW_FORMAT " ");\
+  } else {\
+    printf(INT_FORMAT " ", x);\
+  }\
+}
+  
+  printf("\nInsertion transition matrix with alignment %i\n\n", INSERTION_TRANSITIONS_SIZE );
+  char Header2[] = "     " SPACE "_XM" SPACE "_MM" SPACE "_IM" SPACE "_DM" SPACE "_XI" SPACE "_MI" SPACE "_II" SPACE "_DI" SPACE "_XD" SPACE "_MD" SPACE "_ID" SPACE "_DD"\
+                   "  " SPACE "_MX" SPACE "_IX" SPACE "_DX"\
+                   "  " SPACE "_MY" SPACE "_IY" SPACE "_DY"\
+                   "  " SPACE "_YM" SPACE "_YI" SPACE "_YD\n";
+  fputs(Header2, stdout);
+  fputs("    |", stdout);
+  for (size_t i=0; i<strlen(Header2)-5; ++i) fputc('-', stdout);
+  fputs("\n", stdout);
+
+  for (size_t iprf=0; iprf<prfLength; ++iprf) {
+    printf("%3lu | ", iprf+1);
+    PRINT_VALUE(InsertionLine[iprf].From[EXTRA].To[MATCH]);
+    PRINT_VALUE(InsertionLine[iprf].From[MATCH].To[MATCH]);
+    PRINT_VALUE(InsertionLine[iprf].From[INSERTION].To[MATCH]);
+    PRINT_VALUE(InsertionLine[iprf].From[DELETION].To[MATCH]);
+    
+    PRINT_VALUE(InsertionLine[iprf].From[EXTRA].To[INSERTION]);
+    PRINT_VALUE(InsertionLine[iprf].From[MATCH].To[INSERTION]);
+    PRINT_VALUE(InsertionLine[iprf].From[INSERTION].To[INSERTION]);
+    PRINT_VALUE(InsertionLine[iprf].From[DELETION].To[INSERTION]);
+    
+    PRINT_VALUE(InsertionLine[iprf].From[EXTRA].To[DELETION]);
+    PRINT_VALUE(InsertionLine[iprf].From[MATCH].To[DELETION]);
+    PRINT_VALUE(InsertionLine[iprf].From[INSERTION].To[DELETION]);
+    PRINT_VALUE(InsertionLine[iprf].From[DELETION].To[DELETION]);
+    
+    fputs("  ",stdout);
+    
+    PRINT_VALUE(InsertionLine[iprf].From[MATCH].To[EXTRA]);
+    PRINT_VALUE(InsertionLine[iprf].From[INSERTION].To[EXTRA]);
+    PRINT_VALUE(InsertionLine[iprf].From[DELETION].To[EXTRA]);
+    
+    fputs("  ",stdout);
+    
+    PRINT_VALUE(LastSeq[iprf].From[MATCH]);
+    PRINT_VALUE(LastSeq[iprf].From[INSERTION]);
+    PRINT_VALUE(LastSeq[iprf].From[DELETION]);
+    
+    fputs("  ",stdout);
+    
+    PRINT_VALUE(FirstSeq[iprf].To[MATCH]);
+    PRINT_VALUE(FirstSeq[iprf].To[INSERTION]);
+    PRINT_VALUE(FirstSeq[iprf].To[DELETION]);
+    
+    fputs("\n", stdout);
+  }
+
+  FreeProfile(&prf);
+  return 0;
+}
+#endif
diff --git a/src/C/utils/output.c b/src/C/utils/output.c
new file mode 100644
index 0000000..29a26d1
--- /dev/null
+++ b/src/C/utils/output.c
@@ -0,0 +1,242 @@
+/*******************************************************
+                        PFTOOLS
+ *******************************************************
+  Jan 18, 2011 output.c
+ *******************************************************
+ (C) 2011 Swiss Institute of Bioinformatics
+     Thierry Schuepbach (thierry.schuepbach at isb-sib.ch)
+ *******************************************************/
+
+#include <stdlib.h>
+#include <stdio.h>
+#include "profile.h"
+
+void PrintSimple(const struct Profile * const prf, const char * * const AlignedSequence,
+		 const struct Alignment * const alignment, char * const Header,
+		 const size_t SequenceLength, const float RAVE, const int N)
+{
+  char * cptr = Header;
+  while ( *cptr != ' ' && *cptr != '\0') ++cptr;
+  *cptr = '\0';
+  for (int i=0; i<N; ++i) {   
+    const float normtest = (RawToNormalizedFunction == 0) ? 0.0f : RawToNormalizedFunction(alignment[i].JALS, SequenceLength, RAVE);   
+    fprintf(stdout, "%s %i %f\n%s\n",
+	    Header,
+	    alignment[i].JALS,
+	    normtest,
+	    AlignedSequence[i]);
+  }
+}
+
+// profile_ac start strop raw_score aln_string
+void PrintTSV(const struct Profile * const prf, const char * * const AlignedSequence,
+		 const struct Alignment * const alignment, char * const Header,
+		 const size_t SequenceLength, const float RAVE, const int N)
+{
+    char * id;
+    char * cptr = Header;
+    
+    while ( *cptr != ' ' && *cptr != '\0') ++cptr;
+    *cptr = '\0';
+    id = Header; id++;
+    
+    char * ac  = calloc(strlen(prf->AC_Number),sizeof(char));
+    strcpy(ac,prf->AC_Number);
+    cptr = ac;
+    while ( *cptr != ';' && *cptr != '\0' ) ++cptr;
+    *cptr = '\0';
+
+    for (int i=0; i<N; ++i) {   
+        const float normtest = (RawToNormalizedFunction == 0) 
+                             ? 0.0f 
+                             : RawToNormalizedFunction(alignment[i].JALS, SequenceLength, RAVE);   
+        
+        fprintf(stdout, "%s\t%s\t%i\t%i\t%i\t%f\t%s\n",
+                ac,
+                id,
+                alignment[i].JALB,
+                alignment[i].JALE,
+                alignment[i].JALS,
+                normtest,
+                AlignedSequence[i]);
+    }
+    free(ac);
+}
+
+void PrintDefault(const struct Profile * const prf, const char * * const AlignedSequence,
+        const struct Alignment * const alignment, char * const Header,
+        const size_t SequenceLength, const float RAVE, const int N)
+{
+    char * id;
+    char * des;
+    char * cptr = Header;
+    
+    // Extract ID (id), short ID (cptr) and description (des)
+    while ( *cptr != ' ' && *cptr != '\0') ++cptr;
+    *cptr = '\0';
+    des = ++cptr;
+    while ( *cptr != '|' && *cptr != '>' ) --cptr;
+    ++cptr; 
+    id = Header;
+    ++id;
+    
+    for (unsigned int i=0; i<N; ++i) {   
+        const float normtest = (RawToNormalizedFunction == 0) ? 0.0f : RawToNormalizedFunction(alignment[i].JALS, SequenceLength, RAVE);   
+        fprintf(stdout, "%7.3f %7i pos. %7i - %7i %s %s\n",
+                normtest,
+                alignment[i].JALS,
+                alignment[i].JALB,
+                alignment[i].JALE,
+                id,
+                des
+               );
+    }
+}
+
+void PrintInterpro(const struct Profile * const prf, const char * * const AlignedSequence,
+        const struct Alignment * const alignment, char * const Header,
+        const size_t SequenceLength, const float RAVE, const int N)
+{
+    char * id;
+    char * des;
+    char * buffer = calloc(OutputPrintWidth+1,sizeof(char));
+    char * cptr = Header;
+    
+    // Extract ID (id), short ID (cptr) and description (des)
+    while ( *cptr != ' ' && *cptr != '\0') ++cptr;
+    *cptr = '\0';
+    des = ++cptr;
+    while ( *cptr != '|' && *cptr != '>' ) --cptr;
+    ++cptr; 
+    id = Header;
+    ++id;
+
+    for (unsigned int i=0; i<N; ++i) {   
+        const float normtest = (RawToNormalizedFunction == 0) ? 0.0f : RawToNormalizedFunction(alignment[i].JALS, SequenceLength, RAVE);   
+        if (N > 1)
+        {
+            fprintf(stdout, ">%s_%i L=%i %8.3f %6i pos. %8i -%8i [%5i, %5i] %s %s\n",
+                cptr,
+                i+1,
+                SearchLevel,
+                normtest,
+                alignment[i].JALS,
+                alignment[i].JALB,
+                alignment[i].JALE,
+                alignment[i].IPMB,
+                alignment[i].IPME,
+                id,
+                des 
+               );
+        }
+        else
+        {
+            fprintf(stdout, ">%s L=%i %8.3f %6i pos. %8i -%8i [%5i, %5i] %s %s\n",
+                cptr,
+                SearchLevel,
+                normtest,
+                alignment[i].JALS,
+                alignment[i].JALB,
+                alignment[i].JALE,
+                alignment[i].IPMB,
+                alignment[i].IPME,
+                id,
+                des 
+               );
+        }
+
+        *buffer = '\0';
+        unsigned int offset = 0;
+        unsigned int len    = strlen(AlignedSequence[i]);
+
+        while (offset <= len)
+        {
+            strncpy(buffer,AlignedSequence[i]+offset,OutputPrintWidth);
+            if ( '\0' != *buffer )
+            {
+                fputs(buffer,stdout);
+                fputc('\n',stdout);
+            }
+            offset += OutputPrintWidth;
+        }
+    }
+    free(buffer);
+}
+
+void PrintPfscan(const struct Profile * const prf, const char * * const AlignedSequence,
+        const struct Alignment * const alignment, char * const Header,
+        const size_t SequenceLength, const float RAVE, const int N)
+{
+    char * buffer = calloc(OutputPrintWidth+1,sizeof(char));
+    char * cptr;
+    
+    // Extract ID (id)
+    char * id = calloc(strlen(prf->AC_Number),sizeof(char));
+    strcpy(id,prf->Identification);
+    cptr = id;
+    while ( *cptr != ';' && *cptr != '\0') ++cptr;
+    *cptr = '\0';
+    
+    char * ac  = calloc(strlen(prf->AC_Number),sizeof(char));
+    strcpy(ac,prf->AC_Number);
+    cptr = ac;
+    while ( *cptr != ';' && *cptr != '\0' ) ++cptr;
+    *cptr = '\0';
+        
+    char * des  = prf->Description;
+
+    for (unsigned int i=0; i<N; ++i) {   
+        const float normtest = (RawToNormalizedFunction == 0) 
+                             ? 0.0f 
+                             : RawToNormalizedFunction(alignment[i].JALS, SequenceLength, RAVE);   
+        if (N > 1)
+        {
+            fprintf(stdout, ">%s_%i L=%i %8.3f %6i pos. %8i -%8i [%5i, %5i] %s|%s\n",
+                id,    
+                i+1,
+                SearchLevel,
+                normtest,
+                alignment[i].JALS,
+                alignment[i].JALB,
+                alignment[i].JALE,
+                alignment[i].IPMB,
+                alignment[i].IPME,
+                ac,
+                des 
+               );
+        }
+        else
+        {
+            fprintf(stdout, ">%s L=%i %8.3f %6i pos. %8i -%8i [%5i, %5i] %s|%s\n",
+                id,
+                SearchLevel,
+                normtest,
+                alignment[i].JALS,
+                alignment[i].JALB,
+                alignment[i].JALE,
+                alignment[i].IPMB,
+                alignment[i].IPME,
+                ac,
+                des 
+               );
+        }
+
+        *buffer = '\0';
+        unsigned int offset = 0;
+        unsigned int len    = strlen(AlignedSequence[i]);
+
+        while (offset <= len)
+        {
+            strncpy(buffer,AlignedSequence[i]+offset,OutputPrintWidth);
+            if ( '\0' != *buffer )
+            {
+                fputs(buffer,stdout);
+                fputc('\n',stdout);
+            }
+            offset += OutputPrintWidth;
+        }
+    }
+    free(buffer);
+    free(id);
+    free(ac);
+}
diff --git a/2ft.f b/src/Fortran/2ft.f
similarity index 99%
rename from 2ft.f
rename to src/Fortran/2ft.f
index 2cde4b2..1a78ea7 100644
--- a/2ft.f
+++ b/src/Fortran/2ft.f
@@ -1,6 +1,6 @@
 *       Program 2ft 
 *----------------------------------------------------------------------*     
-* $Id: 2ft.f,v 2.8 2003/11/28 11:53:33 vflegel Exp $
+* $Id: 2ft.f 183 2003-11-28 11:53:33Z vflegel $
 *----------------------------------------------------------------------*
 *       Function: 2-frame translation of DNA sequence into protein
 *       Author:   Philipp Bucher
@@ -128,7 +128,7 @@
       Call Repar(OPTS,OPTR,NW,IRC)
       If(IRC.NE.0) then
          Write(NERR,'(/,
-     *      ''2ft 2.3 revision 5.d'',//
+     *      ''2ft 2.3 revision 4'',//
      *      ''Usage: 2ft [-[r|s]hW] < seq-library-file '',/
      *      )')
          Write(NERR,'(
diff --git a/6ft.f b/src/Fortran/6ft.f
similarity index 99%
rename from 6ft.f
rename to src/Fortran/6ft.f
index 739edc8..2ae0673 100644
--- a/6ft.f
+++ b/src/Fortran/6ft.f
@@ -1,6 +1,6 @@
 *       Program 6ft
 *----------------------------------------------------------------------*
-* $Id: 6ft.f,v 2.8 2003/11/28 11:53:33 vflegel Exp $
+* $Id: 6ft.f 183 2003-11-28 11:53:33Z vflegel $
 *----------------------------------------------------------------------*
 *       Function: 6-frame translation of DNA sequence into protein
 *       Author:   Philipp Bucher
@@ -128,7 +128,7 @@
       Call Repar(OPTS,OPTR,NW,IRC)
       If(IRC.NE.0) then
          Write(NERR,'(/,
-     *      ''6ft 2.3 revision 5.d'',//
+     *      ''6ft 2.3 revision 4'',//
      *      ''Usage: 6ft [-[r|s]hW] < seq-library-file '',/
      *      )')
          Write(NERR,'(
diff --git a/CFAve.f b/src/Fortran/CFAve.f
similarity index 92%
rename from CFAve.f
rename to src/Fortran/CFAve.f
index a07a685..e8a2f71 100644
--- a/CFAve.f
+++ b/src/Fortran/CFAve.f
@@ -1,5 +1,5 @@
 *----------------------------------------------------------------------*     
-* $Id: CFAve.f,v 2.5 2003/04/10 11:58:37 vflegel Exp $
+* $Id: CFAve.f 96 2003-04-10 11:58:37Z vflegel $
 *----------------------------------------------------------------------*     
 *       Version:  File under developpment for release 2.3
 *----------------------------------------------------------------------*     
diff --git a/CPAve.f b/src/Fortran/CPAve.f
similarity index 92%
rename from CPAve.f
rename to src/Fortran/CPAve.f
index b8fbaf4..cd40252 100644
--- a/CPAve.f
+++ b/src/Fortran/CPAve.f
@@ -1,5 +1,5 @@
 *----------------------------------------------------------------------*     
-* $Id: CPAve.f,v 2.4 2003/04/10 11:58:37 vflegel Exp $
+* $Id: CPAve.f 96 2003-04-10 11:58:37Z vflegel $
 *----------------------------------------------------------------------*     
 *       Version:  File under developpment for release 2.3
 *----------------------------------------------------------------------*     
diff --git a/src/Fortran/Makefile b/src/Fortran/Makefile
new file mode 100644
index 0000000..e78677c
--- /dev/null
+++ b/src/Fortran/Makefile
@@ -0,0 +1,546 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# src/Fortran/Makefile.  Generated from Makefile.in by configure.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+
+pkgdatadir = $(datadir)/pftools
+pkgincludedir = $(includedir)/pftools
+pkglibdir = $(libdir)/pftools
+pkglibexecdir = $(libexecdir)/pftools
+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 = x86_64-unknown-linux-gnu
+host_triplet = x86_64-unknown-linux-gnu
+target_triplet = x86_64-unknown-linux-gnu
+bin_PROGRAMS = htop$(EXEEXT) ptoh$(EXEEXT) ptof$(EXEEXT) pfw$(EXEEXT) \
+	2ft$(EXEEXT) 6ft$(EXEEXT) psa2msa$(EXEEXT) pfscan$(EXEEXT) \
+	pfmake$(EXEEXT) pfscale$(EXEEXT) pfsearch$(EXEEXT)
+subdir = src/Fortran
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/C/include/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_2ft_OBJECTS = 2ft.$(OBJEXT)
+2ft_OBJECTS = $(am_2ft_OBJECTS)
+2ft_LDADD = $(LDADD)
+am_6ft_OBJECTS = 6ft.$(OBJEXT)
+6ft_OBJECTS = $(am_6ft_OBJECTS)
+6ft_LDADD = $(LDADD)
+am_htop_OBJECTS = htop.$(OBJEXT)
+htop_OBJECTS = $(am_htop_OBJECTS)
+htop_LDADD = $(LDADD)
+am_pfmake_OBJECTS = pfmake.$(OBJEXT)
+pfmake_OBJECTS = $(am_pfmake_OBJECTS)
+pfmake_LDADD = $(LDADD)
+am_pfscale_OBJECTS = pfscale.$(OBJEXT)
+pfscale_OBJECTS = $(am_pfscale_OBJECTS)
+pfscale_LDADD = $(LDADD)
+am_pfscan_OBJECTS = pfscan.$(OBJEXT)
+pfscan_OBJECTS = $(am_pfscan_OBJECTS)
+pfscan_LDADD = $(LDADD)
+am_pfsearch_OBJECTS = pfsearch.$(OBJEXT)
+pfsearch_OBJECTS = $(am_pfsearch_OBJECTS)
+pfsearch_LDADD = $(LDADD)
+am_pfw_OBJECTS = pfw.$(OBJEXT)
+pfw_OBJECTS = $(am_pfw_OBJECTS)
+pfw_DEPENDENCIES = io.o
+am_psa2msa_OBJECTS = psa2msa.$(OBJEXT)
+psa2msa_OBJECTS = $(am_psa2msa_OBJECTS)
+psa2msa_DEPENDENCIES = io.o
+am_ptof_OBJECTS = ptof.$(OBJEXT)
+ptof_OBJECTS = $(am_ptof_OBJECTS)
+ptof_LDADD = $(LDADD)
+am_ptoh_OBJECTS = ptoh.$(OBJEXT)
+ptoh_OBJECTS = $(am_ptoh_OBJECTS)
+ptoh_LDADD = $(LDADD)
+DEFAULT_INCLUDES = -I. -I$(top_builddir)/src/C/include
+F77COMPILE = $(F77) $(AM_FFLAGS) $(FFLAGS)
+F77LD = $(F77)
+F77LINK = $(F77LD) $(AM_FFLAGS) $(FFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \
+	$@
+SOURCES = $(2ft_SOURCES) $(6ft_SOURCES) $(htop_SOURCES) \
+	$(pfmake_SOURCES) $(pfscale_SOURCES) $(pfscan_SOURCES) \
+	$(pfsearch_SOURCES) $(pfw_SOURCES) $(psa2msa_SOURCES) \
+	$(ptof_SOURCES) $(ptoh_SOURCES)
+DIST_SOURCES = $(2ft_SOURCES) $(6ft_SOURCES) $(htop_SOURCES) \
+	$(pfmake_SOURCES) $(pfscale_SOURCES) $(pfscan_SOURCES) \
+	$(pfsearch_SOURCES) $(pfw_SOURCES) $(psa2msa_SOURCES) \
+	$(ptof_SOURCES) $(ptoh_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /home/lcerutti/home/projects/prosite/prfh/pftools/branches/pftools/missing --run aclocal-1.11
+ALLOCA = 
+AMTAR = ${SHELL} /home/lcerutti/home/projects/prosite/prfh/pftools/branches/pftools/missing --run tar
+AUTOCONF = ${SHELL} /home/lcerutti/home/projects/prosite/prfh/pftools/branches/pftools/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/lcerutti/home/projects/prosite/prfh/pftools/branches/pftools/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/lcerutti/home/projects/prosite/prfh/pftools/branches/pftools/missing --run automake-1.11
+AWK = mawk
+CC = gcc -std=gnu99
+CCDEPMODE = depmode=gcc3
+CFLAGS = -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse
+CPP = 
+CPPFLAGS = 
+CYGPATH_W = echo
+DEFS = -DHAVE_CONFIG_H
+DEPDIR = .deps
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = 
+EXEEXT = 
+F77 = gfortran
+FFLAGS = -mtune=corei7 -march=corei7 -ffast-math -mfpmath=sse
+FPP_OPTION = -cpp
+GREP = 
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+INTEL_IMF = 
+LDFLAGS = 
+LIBOBJS =  ${LIBOBJDIR}malloc$U.o
+LIBS = -lm 
+LTLIBOBJS =  ${LIBOBJDIR}malloc$U.lo
+MAKEINFO = ${SHELL} /home/lcerutti/home/projects/prosite/prfh/pftools/branches/pftools/missing --run makeinfo
+MKDIR_P = /bin/mkdir -p
+OBJEXT = o
+PACKAGE = pftools
+PACKAGE_BUGREPORT = thierry.schuepbach at isb-sib.ch
+PACKAGE_NAME = PfTools
+PACKAGE_STRING = PfTools 3.0
+PACKAGE_TARNAME = pftools
+PACKAGE_URL = 
+PACKAGE_VERSION = 3.0
+PATH_SEPARATOR = :
+PTHREAD_CC = gcc -std=gnu99
+PTHREAD_CFLAGS = -pthread
+PTHREAD_LIBS = 
+SET_MAKE = 
+SHELL = /bin/bash
+SIMD_SSE2_CFLAGS = -msse2
+SIMD_SSE4_1_CFLAGS = -msse4.1
+STRIP = 
+USE_AFFINITY = -D__USE_AFFINITY__
+USE_MMAP = -D__USE_MMAP__
+VERSION = 3.0
+abs_builddir = /home/lcerutti/home/projects/prosite/prfh/pftools/branches/pftools/src/Fortran
+abs_srcdir = /home/lcerutti/home/projects/prosite/prfh/pftools/branches/pftools/src/Fortran
+abs_top_builddir = /home/lcerutti/home/projects/prosite/prfh/pftools/branches/pftools
+abs_top_srcdir = /home/lcerutti/home/projects/prosite/prfh/pftools/branches/pftools
+ac_ct_CC = gcc
+ac_ct_F77 = gfortran
+am__include = include
+am__leading_dot = .
+am__quote = 
+am__tar = ${AMTAR} chof - "$$tardir"
+am__untar = ${AMTAR} xf -
+ax_pthread_config = 
+bindir = ${exec_prefix}/bin
+build = x86_64-unknown-linux-gnu
+build_alias = 
+build_cpu = x86_64
+build_os = linux-gnu
+build_vendor = unknown
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = x86_64-unknown-linux-gnu
+host_alias = 
+host_cpu = x86_64
+host_os = linux-gnu
+host_vendor = unknown
+htmldir = ${docdir}
+includedir = ${prefix}/include
+infodir = ${datarootdir}/info
+install_sh = ${SHELL} /home/lcerutti/home/projects/prosite/prfh/pftools/branches/pftools/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+mandir = ${datarootdir}/man
+mkdir_p = /bin/mkdir -p
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+prefix = /usr/local
+program_transform_name = s,x,x,
+psdir = ${docdir}
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = ${prefix}/etc
+target = x86_64-unknown-linux-gnu
+target_alias = 
+target_cpu = x86_64
+target_os = linux-gnu
+target_vendor = unknown
+top_build_prefix = ../../
+top_builddir = ../..
+top_srcdir = ../..
+htop_SOURCES = htop.f
+ptoh_SOURCES = ptoh.f
+ptof_SOURCES = ptof.f
+pfw_SOURCES = pfw.f
+pfw_LDADD = io.o
+2ft_SOURCES = 2ft.f
+6ft_SOURCES = 6ft.f
+psa2msa_SOURCES = psa2msa.f
+psa2msa_LDADD = io.o
+pfscan_SOURCES = pfscan.f
+pfmake_SOURCES = pfmake.f
+pfscale_SOURCES = pfscale.f
+pfsearch_SOURCES = pfsearch.f
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .f .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Fortran/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/Fortran/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	      echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	      $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+2ft$(EXEEXT): $(2ft_OBJECTS) $(2ft_DEPENDENCIES) 
+	@rm -f 2ft$(EXEEXT)
+	$(F77LINK) $(2ft_OBJECTS) $(2ft_LDADD) $(LIBS)
+6ft$(EXEEXT): $(6ft_OBJECTS) $(6ft_DEPENDENCIES) 
+	@rm -f 6ft$(EXEEXT)
+	$(F77LINK) $(6ft_OBJECTS) $(6ft_LDADD) $(LIBS)
+htop$(EXEEXT): $(htop_OBJECTS) $(htop_DEPENDENCIES) 
+	@rm -f htop$(EXEEXT)
+	$(F77LINK) $(htop_OBJECTS) $(htop_LDADD) $(LIBS)
+pfmake$(EXEEXT): $(pfmake_OBJECTS) $(pfmake_DEPENDENCIES) 
+	@rm -f pfmake$(EXEEXT)
+	$(F77LINK) $(pfmake_OBJECTS) $(pfmake_LDADD) $(LIBS)
+pfscale$(EXEEXT): $(pfscale_OBJECTS) $(pfscale_DEPENDENCIES) 
+	@rm -f pfscale$(EXEEXT)
+	$(F77LINK) $(pfscale_OBJECTS) $(pfscale_LDADD) $(LIBS)
+pfscan$(EXEEXT): $(pfscan_OBJECTS) $(pfscan_DEPENDENCIES) 
+	@rm -f pfscan$(EXEEXT)
+	$(F77LINK) $(pfscan_OBJECTS) $(pfscan_LDADD) $(LIBS)
+pfsearch$(EXEEXT): $(pfsearch_OBJECTS) $(pfsearch_DEPENDENCIES) 
+	@rm -f pfsearch$(EXEEXT)
+	$(F77LINK) $(pfsearch_OBJECTS) $(pfsearch_LDADD) $(LIBS)
+pfw$(EXEEXT): $(pfw_OBJECTS) $(pfw_DEPENDENCIES) 
+	@rm -f pfw$(EXEEXT)
+	$(F77LINK) $(pfw_OBJECTS) $(pfw_LDADD) $(LIBS)
+psa2msa$(EXEEXT): $(psa2msa_OBJECTS) $(psa2msa_DEPENDENCIES) 
+	@rm -f psa2msa$(EXEEXT)
+	$(F77LINK) $(psa2msa_OBJECTS) $(psa2msa_LDADD) $(LIBS)
+ptof$(EXEEXT): $(ptof_OBJECTS) $(ptof_DEPENDENCIES) 
+	@rm -f ptof$(EXEEXT)
+	$(F77LINK) $(ptof_OBJECTS) $(ptof_LDADD) $(LIBS)
+ptoh$(EXEEXT): $(ptoh_OBJECTS) $(ptoh_DEPENDENCIES) 
+	@rm -f ptoh$(EXEEXT)
+	$(F77LINK) $(ptoh_OBJECTS) $(ptoh_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+.f.o:
+	$(F77COMPILE) -c -o $@ $<
+
+.f.obj:
+	$(F77COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-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:
+
+maintainer-clean: maintainer-clean-am
+	-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
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic ctags distclean distclean-compile \
+	distclean-generic distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-binPROGRAMS \
+	install-data install-data-am install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-info install-info-am install-man install-pdf \
+	install-pdf-am install-ps install-ps-am install-strip \
+	installcheck installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-binPROGRAMS
+
+
+io.o: io.c
+	$(CC) -c io.c -o io.o
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/Fortran/Makefile.am b/src/Fortran/Makefile.am
new file mode 100644
index 0000000..e93a6d7
--- /dev/null
+++ b/src/Fortran/Makefile.am
@@ -0,0 +1,19 @@
+bin_PROGRAMS = htop ptoh ptof pfw 2ft 6ft psa2msa pfscan pfmake pfscale pfsearch
+
+htop_SOURCES = htop.f
+ptoh_SOURCES = ptoh.f
+ptof_SOURCES = ptof.f
+pfw_SOURCES = pfw.f
+pfw_LDADD = io.o
+2ft_SOURCES = 2ft.f
+6ft_SOURCES = 6ft.f
+psa2msa_SOURCES = psa2msa.f
+psa2msa_LDADD = io.o
+pfscan_SOURCES = pfscan.f
+pfmake_SOURCES = pfmake.f
+pfscale_SOURCES = pfscale.f
+pfsearch_SOURCES = pfsearch.f
+
+io.o: io.c
+	$(CC) -c io.c -o io.o
+	
\ No newline at end of file
diff --git a/src/Fortran/Makefile.in b/src/Fortran/Makefile.in
new file mode 100644
index 0000000..5746c49
--- /dev/null
+++ b/src/Fortran/Makefile.in
@@ -0,0 +1,546 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ 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@
+bin_PROGRAMS = htop$(EXEEXT) ptoh$(EXEEXT) ptof$(EXEEXT) pfw$(EXEEXT) \
+	2ft$(EXEEXT) 6ft$(EXEEXT) psa2msa$(EXEEXT) pfscan$(EXEEXT) \
+	pfmake$(EXEEXT) pfscale$(EXEEXT) pfsearch$(EXEEXT)
+subdir = src/Fortran
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/C/include/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_2ft_OBJECTS = 2ft.$(OBJEXT)
+2ft_OBJECTS = $(am_2ft_OBJECTS)
+2ft_LDADD = $(LDADD)
+am_6ft_OBJECTS = 6ft.$(OBJEXT)
+6ft_OBJECTS = $(am_6ft_OBJECTS)
+6ft_LDADD = $(LDADD)
+am_htop_OBJECTS = htop.$(OBJEXT)
+htop_OBJECTS = $(am_htop_OBJECTS)
+htop_LDADD = $(LDADD)
+am_pfmake_OBJECTS = pfmake.$(OBJEXT)
+pfmake_OBJECTS = $(am_pfmake_OBJECTS)
+pfmake_LDADD = $(LDADD)
+am_pfscale_OBJECTS = pfscale.$(OBJEXT)
+pfscale_OBJECTS = $(am_pfscale_OBJECTS)
+pfscale_LDADD = $(LDADD)
+am_pfscan_OBJECTS = pfscan.$(OBJEXT)
+pfscan_OBJECTS = $(am_pfscan_OBJECTS)
+pfscan_LDADD = $(LDADD)
+am_pfsearch_OBJECTS = pfsearch.$(OBJEXT)
+pfsearch_OBJECTS = $(am_pfsearch_OBJECTS)
+pfsearch_LDADD = $(LDADD)
+am_pfw_OBJECTS = pfw.$(OBJEXT)
+pfw_OBJECTS = $(am_pfw_OBJECTS)
+pfw_DEPENDENCIES = io.o
+am_psa2msa_OBJECTS = psa2msa.$(OBJEXT)
+psa2msa_OBJECTS = $(am_psa2msa_OBJECTS)
+psa2msa_DEPENDENCIES = io.o
+am_ptof_OBJECTS = ptof.$(OBJEXT)
+ptof_OBJECTS = $(am_ptof_OBJECTS)
+ptof_LDADD = $(LDADD)
+am_ptoh_OBJECTS = ptoh.$(OBJEXT)
+ptoh_OBJECTS = $(am_ptoh_OBJECTS)
+ptoh_LDADD = $(LDADD)
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)/src/C/include
+F77COMPILE = $(F77) $(AM_FFLAGS) $(FFLAGS)
+F77LD = $(F77)
+F77LINK = $(F77LD) $(AM_FFLAGS) $(FFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \
+	$@
+SOURCES = $(2ft_SOURCES) $(6ft_SOURCES) $(htop_SOURCES) \
+	$(pfmake_SOURCES) $(pfscale_SOURCES) $(pfscan_SOURCES) \
+	$(pfsearch_SOURCES) $(pfw_SOURCES) $(psa2msa_SOURCES) \
+	$(ptof_SOURCES) $(ptoh_SOURCES)
+DIST_SOURCES = $(2ft_SOURCES) $(6ft_SOURCES) $(htop_SOURCES) \
+	$(pfmake_SOURCES) $(pfscale_SOURCES) $(pfscan_SOURCES) \
+	$(pfsearch_SOURCES) $(pfw_SOURCES) $(psa2msa_SOURCES) \
+	$(ptof_SOURCES) $(ptoh_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+FPP_OPTION = @FPP_OPTION@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTEL_IMF = @INTEL_IMF@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SIMD_SSE2_CFLAGS = @SIMD_SSE2_CFLAGS@
+SIMD_SSE4_1_CFLAGS = @SIMD_SSE4_1_CFLAGS@
+STRIP = @STRIP@
+USE_AFFINITY = @USE_AFFINITY@
+USE_MMAP = @USE_MMAP@
+VERSION = @VERSION@
+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_F77 = @ac_ct_F77@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+ax_pthread_config = @ax_pthread_config@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+htop_SOURCES = htop.f
+ptoh_SOURCES = ptoh.f
+ptof_SOURCES = ptof.f
+pfw_SOURCES = pfw.f
+pfw_LDADD = io.o
+2ft_SOURCES = 2ft.f
+6ft_SOURCES = 6ft.f
+psa2msa_SOURCES = psa2msa.f
+psa2msa_LDADD = io.o
+pfscan_SOURCES = pfscan.f
+pfmake_SOURCES = pfmake.f
+pfscale_SOURCES = pfscale.f
+pfsearch_SOURCES = pfsearch.f
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .f .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Fortran/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/Fortran/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p; \
+	  then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	      echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	      $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' `; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+2ft$(EXEEXT): $(2ft_OBJECTS) $(2ft_DEPENDENCIES) 
+	@rm -f 2ft$(EXEEXT)
+	$(F77LINK) $(2ft_OBJECTS) $(2ft_LDADD) $(LIBS)
+6ft$(EXEEXT): $(6ft_OBJECTS) $(6ft_DEPENDENCIES) 
+	@rm -f 6ft$(EXEEXT)
+	$(F77LINK) $(6ft_OBJECTS) $(6ft_LDADD) $(LIBS)
+htop$(EXEEXT): $(htop_OBJECTS) $(htop_DEPENDENCIES) 
+	@rm -f htop$(EXEEXT)
+	$(F77LINK) $(htop_OBJECTS) $(htop_LDADD) $(LIBS)
+pfmake$(EXEEXT): $(pfmake_OBJECTS) $(pfmake_DEPENDENCIES) 
+	@rm -f pfmake$(EXEEXT)
+	$(F77LINK) $(pfmake_OBJECTS) $(pfmake_LDADD) $(LIBS)
+pfscale$(EXEEXT): $(pfscale_OBJECTS) $(pfscale_DEPENDENCIES) 
+	@rm -f pfscale$(EXEEXT)
+	$(F77LINK) $(pfscale_OBJECTS) $(pfscale_LDADD) $(LIBS)
+pfscan$(EXEEXT): $(pfscan_OBJECTS) $(pfscan_DEPENDENCIES) 
+	@rm -f pfscan$(EXEEXT)
+	$(F77LINK) $(pfscan_OBJECTS) $(pfscan_LDADD) $(LIBS)
+pfsearch$(EXEEXT): $(pfsearch_OBJECTS) $(pfsearch_DEPENDENCIES) 
+	@rm -f pfsearch$(EXEEXT)
+	$(F77LINK) $(pfsearch_OBJECTS) $(pfsearch_LDADD) $(LIBS)
+pfw$(EXEEXT): $(pfw_OBJECTS) $(pfw_DEPENDENCIES) 
+	@rm -f pfw$(EXEEXT)
+	$(F77LINK) $(pfw_OBJECTS) $(pfw_LDADD) $(LIBS)
+psa2msa$(EXEEXT): $(psa2msa_OBJECTS) $(psa2msa_DEPENDENCIES) 
+	@rm -f psa2msa$(EXEEXT)
+	$(F77LINK) $(psa2msa_OBJECTS) $(psa2msa_LDADD) $(LIBS)
+ptof$(EXEEXT): $(ptof_OBJECTS) $(ptof_DEPENDENCIES) 
+	@rm -f ptof$(EXEEXT)
+	$(F77LINK) $(ptof_OBJECTS) $(ptof_LDADD) $(LIBS)
+ptoh$(EXEEXT): $(ptoh_OBJECTS) $(ptoh_DEPENDENCIES) 
+	@rm -f ptoh$(EXEEXT)
+	$(F77LINK) $(ptoh_OBJECTS) $(ptoh_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+.f.o:
+	$(F77COMPILE) -c -o $@ $<
+
+.f.obj:
+	$(F77COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	set x; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+	unique=`for i in $$list; do \
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+	  done | \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
+
+distclean: distclean-am
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-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:
+
+maintainer-clean: maintainer-clean-am
+	-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
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic ctags distclean distclean-compile \
+	distclean-generic distclean-tags distdir dvi dvi-am html \
+	html-am info info-am install install-am install-binPROGRAMS \
+	install-data install-data-am install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-info install-info-am install-man install-pdf \
+	install-pdf-am install-ps install-ps-am install-strip \
+	installcheck installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+	uninstall-am uninstall-binPROGRAMS
+
+
+io.o: io.c
+	$(CC) -c io.c -o io.o
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/NtoR.f b/src/Fortran/NtoR.f
similarity index 94%
rename from NtoR.f
rename to src/Fortran/NtoR.f
index 4a8e1cb..927fdd2 100644
--- a/NtoR.f
+++ b/src/Fortran/NtoR.f
@@ -1,5 +1,5 @@
 *----------------------------------------------------------------------*     
-* $Id: NtoR.f,v 2.5 2003/02/05 14:24:42 vflegel Exp $
+* $Id: NtoR.f 54 2003-02-05 14:24:42Z vflegel $
 *----------------------------------------------------------------------*     
 *       Version:  File under developpment for release 2.3
 *----------------------------------------------------------------------*     
diff --git a/RtoN.f b/src/Fortran/RtoN.f
similarity index 94%
rename from RtoN.f
rename to src/Fortran/RtoN.f
index 71480e2..d175148 100644
--- a/RtoN.f
+++ b/src/Fortran/RtoN.f
@@ -1,5 +1,5 @@
 *----------------------------------------------------------------------*     
-* $Id: RtoN.f,v 2.4 2003/04/10 11:58:37 vflegel Exp $
+* $Id: RtoN.f 96 2003-04-10 11:58:37Z vflegel $
 *----------------------------------------------------------------------*     
 *       Version:  File under developpment for release 2.3
 *----------------------------------------------------------------------*     
diff --git a/Xblnk.f b/src/Fortran/Xblnk.f
similarity index 92%
rename from Xblnk.f
rename to src/Fortran/Xblnk.f
index 37adbab..699c2be 100644
--- a/Xblnk.f
+++ b/src/Fortran/Xblnk.f
@@ -1,5 +1,5 @@
 *----------------------------------------------------------------------*     
-* $Id: Xblnk.f,v 1.3 2003/11/28 11:56:08 vflegel Exp $
+* $Id: Xblnk.f 185 2003-11-28 11:56:35Z vflegel $
 *----------------------------------------------------------------------*     
 *       Version:  File under developpment for release 2.3
 *----------------------------------------------------------------------*     
diff --git a/abini.f b/src/Fortran/abini.f
similarity index 96%
rename from abini.f
rename to src/Fortran/abini.f
index 351523b..b0cb6e5 100644
--- a/abini.f
+++ b/src/Fortran/abini.f
@@ -1,5 +1,5 @@
 *----------------------------------------------------------------------*     
-* $Id: abini.f,v 2.4 2003/04/10 11:58:37 vflegel Exp $
+* $Id: abini.f 96 2003-04-10 11:58:37Z vflegel $
 *----------------------------------------------------------------------*     
 *       Version:  File under developpment for release 2.3
 *----------------------------------------------------------------------*     
diff --git a/ardim.f b/src/Fortran/ardim.f
similarity index 96%
rename from ardim.f
rename to src/Fortran/ardim.f
index 0ebbb42..20e55a9 100644
--- a/ardim.f
+++ b/src/Fortran/ardim.f
@@ -1,5 +1,5 @@
 *----------------------------------------------------------------------*     
-* $Id: ardim.f,v 2.7 2003/03/21 15:55:44 vflegel Exp $
+* $Id: ardim.f 78 2003-03-21 15:55:44Z vflegel $
 *----------------------------------------------------------------------*     
 *       Version:  File under developpment for release 2.3
 *----------------------------------------------------------------------*     
diff --git a/avdat.f b/src/Fortran/avdat.f
similarity index 87%
rename from avdat.f
rename to src/Fortran/avdat.f
index 2d88d65..b109d38 100644
--- a/avdat.f
+++ b/src/Fortran/avdat.f
@@ -1,5 +1,5 @@
 *----------------------------------------------------------------------*     
-* $Id: avdat.f,v 2.4 2003/04/10 11:58:37 vflegel Exp $
+* $Id: avdat.f 96 2003-04-10 11:58:37Z vflegel $
 *----------------------------------------------------------------------*     
 *       Version:  File under developpment for release 2.3
 *----------------------------------------------------------------------*     
diff --git a/codat.f b/src/Fortran/codat.f
similarity index 91%
rename from codat.f
rename to src/Fortran/codat.f
index aed4648..8fa8fb3 100644
--- a/codat.f
+++ b/src/Fortran/codat.f
@@ -1,5 +1,5 @@
 *----------------------------------------------------------------------*     
-* $Id: codat.f,v 2.4 2003/02/19 08:38:24 vflegel Exp $
+* $Id: codat.f 59 2003-02-19 08:38:25Z vflegel $
 *----------------------------------------------------------------------*     
 *       Version:  File under developpment for release 2.3
 *----------------------------------------------------------------------*     
diff --git a/cvini.f b/src/Fortran/cvini.f
similarity index 93%
rename from cvini.f
rename to src/Fortran/cvini.f
index b4c44e0..67f26ce 100644
--- a/cvini.f
+++ b/src/Fortran/cvini.f
@@ -1,5 +1,5 @@
 *----------------------------------------------------------------------*     
-* $Id: cvini.f,v 2.4 2003/02/19 08:38:24 vflegel Exp $
+* $Id: cvini.f 59 2003-02-19 08:38:25Z vflegel $
 *----------------------------------------------------------------------*     
 *       Version:  File under developpment for release 2.3
 *----------------------------------------------------------------------*     
diff --git a/dfdat.f b/src/Fortran/dfdat.f
similarity index 89%
rename from dfdat.f
rename to src/Fortran/dfdat.f
index b02eb60..5836858 100644
--- a/dfdat.f
+++ b/src/Fortran/dfdat.f
@@ -1,5 +1,5 @@
 *----------------------------------------------------------------------*     
-* $Id: dfdat.f,v 2.4 2003/02/19 08:38:24 vflegel Exp $
+* $Id: dfdat.f 59 2003-02-19 08:38:25Z vflegel $
 *----------------------------------------------------------------------*     
 *       Version:  File under developpment for release 2.3
 *----------------------------------------------------------------------*     
diff --git a/dfnul.f b/src/Fortran/dfnul.f
similarity index 95%
rename from dfnul.f
rename to src/Fortran/dfnul.f
index 75c2bc6..26d5146 100644
--- a/dfnul.f
+++ b/src/Fortran/dfnul.f
@@ -1,5 +1,5 @@
 *----------------------------------------------------------------------*     
-* $Id: dfnul.f,v 2.4 2003/03/26 14:40:29 vflegel Exp $
+* $Id: dfnul.f 93 2003-03-26 14:40:29Z vflegel $
 *----------------------------------------------------------------------*     
 *       Version:  File under developpment for release 2.3
 *----------------------------------------------------------------------*     
diff --git a/djdat.f b/src/Fortran/djdat.f
similarity index 90%
rename from djdat.f
rename to src/Fortran/djdat.f
index ae8d2df..836fbb6 100644
--- a/djdat.f
+++ b/src/Fortran/djdat.f
@@ -1,5 +1,5 @@
 *----------------------------------------------------------------------*     
-* $Id: djdat.f,v 2.4 2003/02/19 08:38:24 vflegel Exp $
+* $Id: djdat.f 59 2003-02-19 08:38:25Z vflegel $
 *----------------------------------------------------------------------*     
 *       Version:  File under developpment for release 2.3
 *----------------------------------------------------------------------*     
diff --git a/gsdat.f b/src/Fortran/gsdat.f
similarity index 91%
rename from gsdat.f
rename to src/Fortran/gsdat.f
index df899c1..df90f7c 100644
--- a/gsdat.f
+++ b/src/Fortran/gsdat.f
@@ -1,5 +1,5 @@
 *----------------------------------------------------------------------*     
-* $Id: gsdat.f,v 2.4 2003/02/19 08:38:24 vflegel Exp $
+* $Id: gsdat.f 59 2003-02-19 08:38:25Z vflegel $
 *----------------------------------------------------------------------*     
 *       Version:  File under developpment for release 2.3
 *----------------------------------------------------------------------*     
diff --git a/gtop.f b/src/Fortran/gtop.f
similarity index 98%
rename from gtop.f
rename to src/Fortran/gtop.f
index bd627d1..638b460 100644
--- a/gtop.f
+++ b/src/Fortran/gtop.f
@@ -1,6 +1,6 @@
 *       Program gtop 
 *----------------------------------------------------------------------*     
-* $Id: gtop.f,v 2.9 2003/11/28 11:53:33 vflegel Exp $
+* $Id: gtop.f 183 2003-11-28 11:53:33Z vflegel $
 *----------------------------------------------------------------------*     
 *       Function: Reformats profiles: in-fmt=GRIBSKOV / out-fmt=PROSITE    
 *       Author:   Philipp Bucher
@@ -57,7 +57,7 @@
      *   (FGPR,LSYM,LLLT,RG,RE,RF,RO,IRC)
       If(IRC.NE.0) then
          Write(NERR,'(/,
-     *      ''gtop 2.3 revision 5.d'',//
+     *      ''gtop 2.3 revision 4'',//
      *      ''Usage: gtop [ -aslhGEFO ] gcg-profile | - '' 
      *      ''[ parameters ]'',/
      *      )')
diff --git a/hmdat.f b/src/Fortran/hmdat.f
similarity index 87%
rename from hmdat.f
rename to src/Fortran/hmdat.f
index bc90262..6630dc4 100644
--- a/hmdat.f
+++ b/src/Fortran/hmdat.f
@@ -1,5 +1,5 @@
 *----------------------------------------------------------------------*     
-* $Id: hmdat.f,v 2.4 2003/02/23 11:51:56 vflegel Exp $
+* $Id: hmdat.f 63 2003-02-23 11:51:56Z vflegel $
 *----------------------------------------------------------------------*     
 *       Version:  File under developpment for release 2.3
 *----------------------------------------------------------------------*     
diff --git a/htop.f b/src/Fortran/htop.f
similarity index 99%
rename from htop.f
rename to src/Fortran/htop.f
index 55671ff..f20ff93 100644
--- a/htop.f
+++ b/src/Fortran/htop.f
@@ -1,6 +1,6 @@
 *       Program htop 
 *----------------------------------------------------------------------*     
-* $Id: htop.f,v 2.12 2003/12/01 13:33:04 vflegel Exp $
+* $Id: htop.f 187 2003-12-01 13:33:05Z vflegel $
 *----------------------------------------------------------------------*     
 *       Function: Reformats profiles: in-fmt=HMMER / out-fmt=PROSITE    
 *       Author:   Philipp Bucher
@@ -77,7 +77,7 @@
      *   DB,RC,DL,NM,RP,RQ,RF,RH,IRC)
       If(IRC.NE.0) then
          Write(NERR,'(/,
-     *      ''htop 2.3 revision 5.d'',//
+     *      ''htop 2.3 revision 4'',//
      *      ''Usage: htop [ -fhilosBCFHLMPQ ] [ hmm-file | - ] ''
      *      ''[ random-model-file ] [ parameters ]'',/
      *      )')
diff --git a/src/Fortran/io.c b/src/Fortran/io.c
new file mode 100644
index 0000000..26d327b
--- /dev/null
+++ b/src/Fortran/io.c
@@ -0,0 +1,15 @@
+#include <stdio.h>
+
+int getc_(ch, ch_len)
+char *ch;
+int *ch_len;
+{
+    int ret_val;
+    *ch = getc(stdin);
+    if(*(unsigned char *)ch == 255) { 
+	ret_val = -1;
+    } else {
+	ret_val = -0;
+    }
+    return ret_val;
+} 
diff --git a/lblnk.f b/src/Fortran/lblnk.f
similarity index 90%
rename from lblnk.f
rename to src/Fortran/lblnk.f
index 86de567..ee6e0f8 100644
--- a/lblnk.f
+++ b/src/Fortran/lblnk.f
@@ -1,5 +1,5 @@
 *----------------------------------------------------------------------*     
-* $Id: lblnk.f,v 2.6 2003/11/28 11:56:35 vflegel Exp $
+* $Id: lblnk.f 185 2003-11-28 11:56:35Z vflegel $
 *----------------------------------------------------------------------*     
 *       Version:  File under developpment for release 2.3
 *----------------------------------------------------------------------*     
diff --git a/nodat.f b/src/Fortran/nodat.f
similarity index 92%
rename from nodat.f
rename to src/Fortran/nodat.f
index 432758d..b1d695d 100644
--- a/nodat.f
+++ b/src/Fortran/nodat.f
@@ -1,5 +1,5 @@
 *----------------------------------------------------------------------*     
-* $Id: nodat.f,v 2.4 2003/02/19 08:38:25 vflegel Exp $
+* $Id: nodat.f 59 2003-02-19 08:38:25Z vflegel $
 *----------------------------------------------------------------------*     
 *       Version:  File under developpment for release 2.3
 *----------------------------------------------------------------------*     
diff --git a/pfdat.f b/src/Fortran/pfdat.f
similarity index 97%
rename from pfdat.f
rename to src/Fortran/pfdat.f
index b0f28a1..0cad0b9 100644
--- a/pfdat.f
+++ b/src/Fortran/pfdat.f
@@ -1,5 +1,5 @@
 *----------------------------------------------------------------------*     
-* $Id: pfdat.f,v 2.5 2003/02/19 08:38:25 vflegel Exp $
+* $Id: pfdat.f 59 2003-02-19 08:38:25Z vflegel $
 *----------------------------------------------------------------------*     
 *       Version:  File under developpment for release 2.3
 *----------------------------------------------------------------------*     
diff --git a/pfind.f b/src/Fortran/pfind.f
similarity index 97%
rename from pfind.f
rename to src/Fortran/pfind.f
index cd6b336..ba6e900 100644
--- a/pfind.f
+++ b/src/Fortran/pfind.f
@@ -1,5 +1,5 @@
 *----------------------------------------------------------------------*     
-* $Id: pfind.f,v 2.3 2003/02/23 11:51:56 vflegel Exp $
+* $Id: pfind.f 63 2003-02-23 11:51:56Z vflegel $
 *----------------------------------------------------------------------*     
 *       Version:  File under developpment for release 2.3
 *----------------------------------------------------------------------*     
diff --git a/pfmake.f b/src/Fortran/pfmake.f
similarity index 99%
rename from pfmake.f
rename to src/Fortran/pfmake.f
index 5c0c96c..f61fd7c 100644
--- a/pfmake.f
+++ b/src/Fortran/pfmake.f
@@ -1,6 +1,6 @@
 *       Program pfmake
 *----------------------------------------------------------------------*     
-* $Id: pfmake.f,v 2.11 2003/11/28 11:53:33 vflegel Exp $
+* $Id: pfmake.f 183 2003-11-28 11:53:33Z vflegel $
 *----------------------------------------------------------------------*     
 *       Function: Constructs a profile from a multiple sequence 
 *                 alignment 
@@ -69,7 +69,9 @@ C      Character*64      FOUT
 * profile
 
       Character*512     FPRF
-      Character*30      FDAT
+      Character*24      FDAT
+      Integer*4         now(3)
+
 
 
 * function return types
@@ -132,7 +134,7 @@ C      Character*64      FOUT
      *   LLLT,OPTM,RE,RF,RG,RH,RI,RL,RM,RS,RT,RX,NLOW,IRC)
       If(IRC.NE.0) then
          Write(NERR,'(/,
-     *      ''pfmake 2.3 revision 5.d'',//
+     *      ''pfmake 2.3 revision 4'',//
      *      ''Usage: pfmake [ -0123abcehlsEFGHILMSTX ] [ msf-file'',
      *      '' | - ] score-matrix [ profile-file ] [ parameters ]'',//
      *      )')
@@ -432,7 +434,8 @@ C                Write(6,'(I4,1x,A,F10.4)') K1,CABC(I2),SPRF(I2,K1)
 
       If(CPID.EQ.' ') CPID='SEQUENCE_PROFILE'
       If(CPAC.EQ.' ') CPAC='ZZ99999'
-      CALL Fdate(FDAT)
+      call idate(now)
+      write(FDAT,"(i2.2,'/',i2.2,'/',i4.4)") now(1), now(2), now(3)
       If(CPDT.NE.' ') then
          CPDT=FDAT(1:Lblnk(FDAT)) // ' ! ' // CPDT
       Else
diff --git a/pfscale.f b/src/Fortran/pfscale.f
similarity index 99%
rename from pfscale.f
rename to src/Fortran/pfscale.f
index f99e125..a90a953 100644
--- a/pfscale.f
+++ b/src/Fortran/pfscale.f
@@ -1,6 +1,6 @@
 *       Program pfscale 
 *----------------------------------------------------------------------*     
-* $Id: pfscale.f,v 2.11 2003/11/28 11:53:33 vflegel Exp $
+* $Id: pfscale.f 183 2003-11-28 11:53:33Z vflegel $
 *----------------------------------------------------------------------*     
 *       Function: Fits paramters of an extreme value distribution to a
 *                 profile score distribution. Input: sorted score list.
@@ -71,7 +71,7 @@
       Call Repar(FSCL,FPRF,LLLT,DL,NN,RP,RQ,LMNB,IMNB,IRC)
       If(IRC.NE.0) then
          Write(NERR,'(/,
-     *      ''pfscale 2.3 revision 5.d'',//
+     *      ''pfscale 2.3 revision 4'',//
      *      ''Usage: pfscale [ -lhLMNPQ ] [ score-list | - ] '' 
      *      ''[ profile-file ] [ parameters ]'',/
      *      )')
diff --git a/pfscan.f b/src/Fortran/pfscan.f
similarity index 99%
rename from pfscan.f
rename to src/Fortran/pfscan.f
index 0fc8bfa..8b24a1f 100644
--- a/pfscan.f
+++ b/src/Fortran/pfscan.f
@@ -1,6 +1,6 @@
 *       Program pfscan
 *----------------------------------------------------------------------*     
-* $Id: pfscan.f,v 2.17 2003/12/09 13:42:42 vflegel Exp $
+* $Id: pfscan.f 188 2003-12-09 13:42:42Z vflegel $
 *----------------------------------------------------------------------*     
 *       Function: Scan a DNA or protein sequences with a profile library 
 *       Author:   Philipp Bucher
@@ -182,7 +182,7 @@ C      Character*256     RCIN
      *   OPTK,FPRF,FSEQ,LCUC,NW,NMOD,OPTO,OPTD,OPTV,IRC)
       If(IRC.NE.0) then 
          Write(NERR,'(/,
-     *      ''pfscan 2.3 revision 5.d'',//
+     *      ''pfscan 2.3 revision 4'',//
      *      ''Usage: pfscan[ -abCdfhlLmMkrsuvWxyz ] [ seq-file'',
      *      '' | - ] [ profile-library-file | - ] [ parameters ]'',//
      *      )')
diff --git a/pfsearch.f.cpy b/src/Fortran/pfsearch.f
similarity index 99%
rename from pfsearch.f.cpy
rename to src/Fortran/pfsearch.f
index 545a37f..bf241ff 100644
--- a/pfsearch.f.cpy
+++ b/src/Fortran/pfsearch.f
@@ -1,6 +1,6 @@
 *       Program pfsearch
 *----------------------------------------------------------------------*     
-* $Id: pfsearch.f,v 2.30 2003/12/09 13:42:42 vflegel Exp $
+* $Id: pfsearch.f 188 2003-12-09 13:42:42Z vflegel $
 *----------------------------------------------------------------------*     
 *       Function: Scan a protein or DNA sequence library for profile 
 *                 matches 
diff --git a/src/Fortran/pfsearchV2.f b/src/Fortran/pfsearchV2.f
new file mode 100644
index 0000000..daee4dc
--- /dev/null
+++ b/src/Fortran/pfsearchV2.f
@@ -0,0 +1,550 @@
+*       Program pfsearch
+*----------------------------------------------------------------------*     
+*       Function: Scan a protein or DNA sequence library for profile 
+*                 matches 
+*       Author:   Philipp Bucher
+*       Version:  This file is part of pftools release 2.2 June 1999
+*----------------------------------------------------------------------*     
+* DATA
+*----------------------------------------------------------------------*     
+
+* array dimensions and I/O units
+
+        Include         'ardim.f' 
+
+        Parameter        (NOUT=   6)    
+
+        Parameter        (NPRF=  11)    
+        Parameter        (NSEQ=  12)    
+
+* profile 
+
+        Character*64      FPRF
+
+        Include          'psdat.f'
+        Include          'gsdat.f'
+        Include          'djdat.f'
+        Include          'nodat.f'
+        Include          'codat.f'
+        Include          'pfdat.f'
+        Include          'dfdat.f'
+        Include          'pxdat.f'
+        Include          'avdat.f'
+        Include          'sterr.f'
+
+        Logical           LUNI
+        Logical           LNOR
+        Logical           LREV
+        Logical           LTRA
+        Logical           LPFA
+        Logical           LEOF
+
+* sequence
+
+        Character*64      FSEQ
+
+        Character*64      CSID
+        Character*64      CSAC
+        Character*256     CSDE
+
+        Integer           LSEQ
+        Integer*2         ISEQ(IDMS)
+
+        Logical           LCKS(IDMS)
+
+        Integer*2         IS
+
+* options and command line parameters
+
+        Logical           OPTA
+        Logical           OPTB 
+        Logical           OPTF 
+        Logical           OPTL 
+        Logical           OPLU 
+        Logical           OPTR 
+        Logical           OPTS 
+        Logical           OPTU 
+        Logical           OPTX 
+        Logical           OPTY 
+        Logical           OPTZ 
+        
+        Integer           NCUC
+        Integer           KCUC
+        real              XCUC
+
+* alignments
+
+        Integer           NALI
+        Integer           IALS(IDMN)
+        Integer           IALB(IDMN)
+        Integer           IAL1(IDMN)
+        Integer           IAL2(IDMN)
+        Integer           IALE(IDMN)
+
+        Integer           LALI
+        Character         CALI(IDMA) 
+        Character         CPMA(IDMM)
+
+* path matrix fields
+
+        Integer           IOPM(0:IDMP)
+        Integer           IOPI(0:IDMP)
+        Integer           IOPD(0:IDMP)
+
+        Integer           IOMB(0:IDMP)
+        Integer           IOM1(0:IDMP)
+        Integer           IOM2(0:IDMP)
+
+        Integer           IOIB(0:IDMP)
+        Integer           IOI1(0:IDMP)
+        Integer           IOI2(0:IDMP)
+
+        Integer           IODB(0:IDMP)
+        Integer           IOD1(0:IDMP)
+        Integer           IOD2(0:IDMP)
+
+* work fields
+
+        Character*256     RCIN
+
+* initialization of controlled vocabularies
+
+        Include          'cvini.f' 
+
+*----------------------------------------------------------------------*     
+* INPUT SECTION 
+*----------------------------------------------------------------------*     
+
+        IRC=0
+
+        LUNI=.FALSE.
+        LNOR=.FALSE.
+        LREV=.FALSE.
+        LTRA=.FALSE.
+        LPFA=.FALSE.
+        LEOF=.FALSE.
+
+        LEOF=.FALSE.
+        CABC(0)='-'
+ 
+* read command line arguments
+
+        Call Repar(
+     *     OPTA,OPTB,OPTF,OPTL,OPLU,OPTR,OPTS,OPTU,OPTX,OPTY,OPTZ,
+     *     FPRF,FSEQ,NCUC,KCUC,XCUC,NW,IRC)
+        If(IRC.NE.0) then 
+           Write(NERR,'(
+     *      ''Usage: pfsearch [ -abflLrsuxyz ] [ profile-file | - ] '',
+     *      ''[ seq-library-file | - ] [ parameters ]'',//,
+     *      ''   valid parameters are:'',//,
+     *      ''                 [C=cut-off-value]          '',/
+     *      ''                 [W=output-width]           '',/
+     *        )')
+           Stop
+        End if
+
+        If(FSEQ.EQ.'-') then 
+           MSEQ=5
+        Else
+           MSEQ=NSEQ
+        End if
+
+        If(FPRF.EQ.'-') then 
+           MPRF=5
+        Else
+           MPRF=NPRF
+        End if
+
+* read profile
+
+        Call REPRF
+     *    (MPRF,FPRF,
+     *     CPID,CPAC,CPDT,CPDE,LHDR,CHDR,LFTR,CFTR,NABC,CABC,LPRF,LPCI,
+     *     BLOG,FABC,P0,
+     *     CDIS,JDIP,MDIS,NDIP,
+     *     CNOR,JNOP,JNOR,MNOR,NNOR,NNPR,CNTX,RNOP, 
+     *     JCUT,MCLE,CCUT,ICUT,JCNM,RCUT,MCUT, 
+     *     IDMP,CHIP,IIPP,CHMP,IMPP,
+     *     CHID,IIPD,CHMD,IMPD,
+     *     IRC)
+
+        If(IRC.GT.0) go to 100
+
+* cut-off form profile 
+
+           KCUT=0
+        Do   6 I1=1,JCUT
+           If(MCLE(I1).EQ.0) then
+                 INOR=0
+              If(JCNM(I1).NE.0) then 
+                 LNOR=.TRUE.
+                       J2=1
+                 Do  5 I2=1,JCNM(I1)
+                          J3=0
+                    Do  4 I3=1,JNOR
+                       If(MCUT(I2,I1).EQ.NNOR(I3)) J3=I3
+    4               Continue
+                 
+                    If     (I2.EQ.1) then 
+                       INOR=J3
+                       NPRI=NNPR(J3)    
+                       IFUN=MNOR(J3)
+                       KCUT=ICUT(I1)
+                       XCUT=RCUT(I2,I1)
+                    Else if(NNPR(J3).LT.NPRI) then
+                       INOR=J3
+                       NPRI=NNPR(J3)    
+                       IFUN=MNOR(J3)
+                       KCUT=ICUT(I1)
+                       XCUT=RCUT(I2,I1)
+                    End if
+    5            Continue
+              End if 
+
+              If(JCNM(I1).EQ.0.OR.INOR.EQ.0) then
+                 KCUT=ICUT(I1)
+                 LNOR=.FALSE.
+              End if
+           End if
+    6   Continue
+
+* cut-off from command line 
+
+        If     (NCUC.EQ.1) then 
+           KCUT=KCUC 
+           LNOR=.FALSE.
+        Else if(NCUC.EQ.2.AND.LNOR) then
+           XCUT=XCUC 
+        End if
+
+        If(OPTR) LNOR=.FALSE.
+
+* disjointness definition
+
+        If(MDIS.EQ.1.OR.OPTU.OR.OPTA) then
+           LUNI=.TRUE.
+        Else
+           LUNI=.FALSE.
+
+* - initialize profile lock
+
+           If(.NOT.LPCI) then
+              Do  8 I1=0,NDIP(1)-1 
+                 IIPP(E0,I1)=NLOW
+                 IIPP(E1,I1)=NLOW
+    8         Continue
+
+              Do  9 I1=NDIP(2),LPRF 
+                 IIPP(B0,I1)=NLOW
+                 IIPP(B1,I1)=NLOW
+    9         Continue
+           End if
+
+        End if
+
+* profile extra parameters
+
+           MLOW=NLOW/4*3
+        Do  10 I1=0,LPRF
+           IIPX( XM,I1) = MAX(MLOW,IIPP( B1,I1) + IIPP( BM,I1)) 
+           IIPX( XI,I1) = MAX(MLOW,IIPP( B1,I1) + IIPP( BI,I1)) 
+           IIPX( XD,I1) = MAX(MLOW,IIPP( B1,I1) + IIPP( BD,I1)) 
+           IIPX( YM,I1) = MAX(MLOW,IIPP( B0,I1) + IIPP( BM,I1)) 
+           IIPX( YI,I1) = MAX(MLOW,IIPP( B0,I1) + IIPP( BI,I1)) 
+           IIPX( YD,I1) = MAX(MLOW,IIPP( B0,I1) + IIPP( BD,I1)) 
+           IIPX( MX,I1) = MAX(MLOW,IIPP( E1,I1) + IIPP( ME,I1)) 
+           IIPX( IX,I1) = MAX(MLOW,IIPP( E1,I1) + IIPP( IE,I1)) 
+           IIPX( DX,I1) = MAX(MLOW,IIPP( E1,I1) + IIPP( DE,I1)) 
+           IIPX( MY,I1) = MAX(MLOW,IIPP( E0,I1) + IIPP( ME,I1)) 
+           IIPX( IY,I1) = MAX(MLOW,IIPP( E0,I1) + IIPP( IE,I1)) 
+           IIPX( DY,I1) = MAX(MLOW,IIPP( E0,I1) + IIPP( DE,I1))
+	   print *, "DBG", i1, "B1", IIPP( B1,I1), "BM", IIPP( BM,I1)
+     *             , IIPX( XM,I1)
+   10   Continue
+
+* average match score for average amino acid composition 
+
+        If(LNOR.AND.IFUN.EQ.3) 
+     *     Call CPAve(IMPP,IDMP,LPRF,CABC,NABC,PAVE)
+
+* alignment and ouptut format switches 
+
+        If(OPTX.OR.OPTY.OR.OPTZ) then 
+           LTRA=.TRUE.
+        Else
+           LTRA=.FALSE.
+        End if
+        If(OPTS.OR.OPTX) then
+           LPFA=.TRUE.
+        Else
+           LPFA=.FALSE.
+        End if
+  
+*----------------------------------------------------------------------*
+* major loop over sequences
+*----------------------------------------------------------------------*
+
+* read sequence  
+
+   20   Continue
+        If(LEOF) go to 100
+        If(OPTF) then 
+           Call RFSEQ
+     *      (MSEQ,FSEQ,NABC,CABC,CSID,CSAC,CSDE,LSEQ,ISEQ,LEOF,RCIN,IRC)
+        Else 
+           Call RESEQ
+     *      (MSEQ,FSEQ,NABC,CABC,CSID,CSAC,CSDE,LSEQ,ISEQ,LEOF,RCIN,IRC)
+        End if 
+        If(IRC.EQ.-1) go to 100
+
+        If(IRC.NE.0) then 
+           Write(NERR,'(
+     *      ''Sequence file unreadable or in wrong format.''
+     *        )')
+           Stop
+        End if 
+
+        JSEQ=0
+
+   25   Continue
+
+* compute cut-off in raw score units
+
+        If(LNOR) then
+           If(IFUN.EQ.3) then
+              Call CFAve(ISEQ,IDMS,LSEQ,CABC,NABC,FAVE)
+                 RAVE=0
+              Do  I1=0,NABC
+                 RAVE=RAVE+FAVE(I1)*PAVE(I1)
+              End do
+           End if
+           Call NtoR(XCUT,KCUT,RNOP,KNPM,MAXN,INOR,IFUN,LSEQ,RAVE)
+        End if
+
+* compute optimal alignment score
+
+        Call XALI1
+     *    (NABC,CABC,LPRF,LPCI,
+     *     KCUT,IDMP,IIPP,IMPP,CHIP,CHMP,IIPX,
+     *     IDMS,LSEQ,ISEQ,
+     *     IOPM,IOPI,IOPD,
+     *     IOPT,LUNI,  
+     *     IRC)
+
+        If(OPTA) then
+           Continue         
+        Else if(IOPT.LT.KCUT) then
+           go to  50
+        End if 
+
+        If(LUNI) go to  30 
+
+* initialize sequence lock
+
+        Do I1=1,LSEQ
+           LCKS(I1)=.FALSE.
+        End do  
+
+* find multiple matches 
+
+        Call XALIP
+     *    (NABC,CABC,LPRF,LPCI,NDIP(1),NDIP(2),
+     *     KCUT,IDMP,IIPP,IMPP,CHIP,CHMP,IIPX,
+     *     IDMS,LSEQ,ISEQ,LCKS,
+     *     IOPM,IOPI,IOPD,
+     *     IOMB,IOM1,IOM2,IOIB,IOI1,IOI2,IODB,IOD1,IOD2,
+     *     IDMN,NALI,IALS,IALB,IAL1,IAL2,IALE, 
+     *     IRC)
+
+* remove sequence lock if alignments are to be generated
+
+        If(LTRA) then 
+           Do I1=1,LSEQ
+              LCKS(I1)=.FALSE.
+           End do 
+        End if 
+
+* OUTPUT 
+
+   30   Continue         
+ 
+        If(LUNI) then 
+           NALI=1
+           IALS(1)=IOPT
+        End if 
+        
+        Do  40 I1=1,NALI
+           JSEQ=JSEQ+1
+
+           If(LTRA) then 
+              Call XALIT
+     *          (NABC,CABC,LPRF,LPCI,NDIP(1),NDIP(2),
+     *           KCUT,IDMP,IIPP,IMPP,CHIP,CHMP,IIPX,
+     *           IDMS,LSEQ,ISEQ,LCKS,
+     *           IOPM,IOPI,IOPD,
+     *           LALI,IDMA,CALI,IDMM,CPMA,
+     *           IALS(I1),IALB(I1),IALE(I1), 
+     *           IPMB,IPME,
+     *           IRC)
+              Do  I2=IAL1(I1),IAL2(I1)
+                 LCKS(I2)=.TRUE.
+              End do
+           End if 
+
+           Call WPRSM(JSEQ,
+     *       LUNI,LNOR,LREV,LPFA,OPTZ,OPTL,OPLU,NW,
+     *       CSID,CSAC,CSDE,
+     *       IALS(I1),IALB(I1),IALE(I1),NALI,IPMB,IPME,
+     *       JCUT,MCLE,CCUT,ICUT,JCNM,RCUT,MCUT,
+     *       RNOP,KNPM,MAXN,INOR,IFUN,LSEQ,RAVE)
+
+           If     (OPTS) then
+              Write(6,'((60A))')(CABC(ISEQ(ii1)),ii1=IALB(I1),IALE(I1))
+           Else if(OPTX) then
+              Write(6,'((60A))')(CALI(ii1),ii1=1,LALI)
+           Else if(OPTY) then 
+              Call PRALI
+     *          (LPRF,CHIP,CHMP,IDMP,LSEQ,LREV,
+     *           CALI,LALI,IALB(I1),IALE(I1))
+           End if 
+
+   40   Continue
+
+   50   Continue
+
+        If(OPTB) then 
+           If(LREV) then 
+              LREV=.FALSE.
+              Go to  20
+           Else
+              Continue
+           End if
+        Else
+           Go to  20
+        End if
+
+*----------------------------------------------------------------------*
+* Complementary strand 
+*----------------------------------------------------------------------*
+
+        LREV=.TRUE.
+
+* generate complementary sequence
+
+           J1=LSEQ          
+        Do  I1=1,LSEQ/2
+           IS=ISEQ(I1)
+           ISEQ(I1)=ISEQ(J1)
+           ISEQ(J1)=IS
+           J1=J1-1
+        End do  
+
+        Do  I1=1,LSEQ
+           If(ISEQ(I1).NE.0) ISEQ(I1)=NABC-ISEQ(I1)+1
+        End do
+
+        Go to  25
+
+  100   Stop
+        End
+*----------------------------------------------------------------------*     
+        Subroutine Repar(
+     *     OPTA,OPTB,OPTF,OPTL,OPLU,OPTR,OPTS,OPTU,OPTX,OPTY,OPTZ,
+     *     FPRF,FSEQ,NCUC,KCUC,XCUC,NW,IRC)
+
+        Logical           OPTA 
+        Logical           OPTB 
+        Logical           OPTF 
+        Logical           OPTL 
+        Logical           OPLU 
+        Logical           OPTR 
+        Logical           OPTS 
+        Logical           OPTU 
+        Logical           OPTX 
+        Logical           OPTY 
+        Logical           OPTZ 
+
+        Character*64      FPRF
+        Character*64      FSEQ
+        Character*64      CARG
+
+        IRC=0
+        NCUC=0
+        OPTA=.FALSE.
+        OPTB=.FALSE.
+        OPTF=.FALSE.
+        OPTL=.FALSE.
+        OPLU=.FALSE.
+        OPTR=.FALSE.
+        OPTS=.FALSE.
+        OPTU=.FALSE.
+        OPTX=.FALSE.
+        OPTY=.FALSE.
+        OPTZ=.FALSE.
+
+        NW=132
+
+        N1=Iargc()
+
+           K1=0
+        Do  10 I1=1,N1
+           Call GetArg(I1,CARG)
+           If     (CARG(1:1).EQ.'-'.
+     *                AND.CARG(2:2).NE.' '.AND.K1.LT.1) then
+              If(Index(CARG,'a').NE.0) OPTA=.TRUE.
+              If(Index(CARG,'b').NE.0) OPTB=.TRUE.
+              If(Index(CARG,'f').NE.0) OPTF=.TRUE.
+              If(Index(CARG,'l').NE.0) OPTL=.TRUE.
+              If(Index(CARG,'L').NE.0) OPLU=.TRUE.
+              If(Index(CARG,'r').NE.0) OPTR=.TRUE.
+              If(Index(CARG,'s').NE.0) OPTS=.TRUE.
+              If(Index(CARG,'u').NE.0) OPTU=.TRUE.
+              If(Index(CARG,'x').NE.0) OPTX=.TRUE.
+              If(Index(CARG,'y').NE.0) OPTY=.TRUE.
+              If(Index(CARG,'z').NE.0) OPTZ=.TRUE.
+           Else if(K1.LE.1) then
+              K1=K1+1
+              If     (K1.EQ.1) then 
+                 FPRF=CARG
+              Else if(K1.EQ.2) then
+                 FSEQ=CARG
+              End if  
+           Else 
+
+* - cut-off value on command line    
+
+              If     (CARG(1:2).EQ.'C=') then
+                 CARG(1:2)='  '
+                 If(Index(CARG,'.').EQ.0) then
+                    NCUC=1 
+                    Read(CARG,*) KCUC
+                 Else 
+                    NCUC=2
+                    Read(CARG,*) XCUC
+                 End if 
+              Else if(CARG(1:2).EQ.'W=') then
+                 Read(CARG(3:64),*,Err=900) NW
+              End if
+           End if
+   10   Continue 
+
+        If (K1.NE.2) IRC=1 
+           
+  100   Return
+  900   IRC=1
+        Go to 100
+        End 
+*----------------------------------------------------------------------*     
+        Include          'reprf.f'
+        Include          'reseq.f'
+        Include          'rfseq.f'
+#include "xali1.f"
+        Include          'xalip.f'
+        Include          'RtoN.f'
+        Include          'NtoR.f'
+        Include          'CFAve.f'
+        Include          'CPAve.f'
+        Include          'wprsm.f'
+        Include          'xalit.f'
+        Include          'lblnk.f'
+        Include          'prali.f'
diff --git a/pfw.f b/src/Fortran/pfw.f
similarity index 99%
rename from pfw.f
rename to src/Fortran/pfw.f
index ea7416a..c3fcd9e 100644
--- a/pfw.f
+++ b/src/Fortran/pfw.f
@@ -1,6 +1,6 @@
 *       Program pfw
 *----------------------------------------------------------------------*     
-* $Id: pfw.f,v 2.10 2004/01/09 09:27:36 vflegel Exp $
+* $Id: pfw.f 190 2004-01-09 09:27:36Z vflegel $
 *----------------------------------------------------------------------*     
 *       Function: Calculate weights for individual sequences of a 
 *                 multiple sequence alignment.      
@@ -80,7 +80,7 @@ C       Integer           Fputc
      *   (FMSF,NRAN,RX,RW,IRAN,OPTM,IRC) 
       If(IRC.NE.0) then
          Write(NERR,'(/,
-     *      ''pfw 2.3 revision 5.d'',//
+     *      ''pfw 2.3 revision 4'',//
      *      ''Usage: pfw [ -hmNXRW ] [ msf-file | - ] '',
      *      ''[ parameters ]'',//
      *      )')
diff --git a/pmali.f b/src/Fortran/pmali.f
similarity index 98%
rename from pmali.f
rename to src/Fortran/pmali.f
index 75d1d0c..9e2c437 100644
--- a/pmali.f
+++ b/src/Fortran/pmali.f
@@ -1,5 +1,5 @@
 *----------------------------------------------------------------------*     
-* $Id: pmali.f,v 1.5 2003/07/03 13:08:58 vflegel Exp $
+* $Id: pmali.f 150 2003-07-03 13:08:58Z vflegel $
 *----------------------------------------------------------------------*     
 *       Version:  File under developpment for release 2.3
 *----------------------------------------------------------------------*     
diff --git a/prali.f b/src/Fortran/prali.f
similarity index 98%
rename from prali.f
rename to src/Fortran/prali.f
index 2c57d42..c357041 100644
--- a/prali.f
+++ b/src/Fortran/prali.f
@@ -1,5 +1,5 @@
 *----------------------------------------------------------------------*     
-* $Id: prali.f,v 2.8 2003/07/03 13:08:58 vflegel Exp $
+* $Id: prali.f 150 2003-07-03 13:08:58Z vflegel $
 *----------------------------------------------------------------------*     
 *       Version:  File under developpment for release 2.3
 *----------------------------------------------------------------------*     
diff --git a/prsp.f b/src/Fortran/prsp.f
similarity index 97%
rename from prsp.f
rename to src/Fortran/prsp.f
index 5de16e3..26ad9b7 100644
--- a/prsp.f
+++ b/src/Fortran/prsp.f
@@ -1,5 +1,5 @@
 *----------------------------------------------------------------------*     
-* $Id: prsp.f,v 1.4 2003/07/03 13:08:58 vflegel Exp $
+* $Id: prsp.f 150 2003-07-03 13:08:58Z vflegel $
 *----------------------------------------------------------------------*     
 *        Print sequence or psa alignment
 *        Version:  File under developpment for release 2.3
diff --git a/prxp.f b/src/Fortran/prxp.f
similarity index 96%
rename from prxp.f
rename to src/Fortran/prxp.f
index e580a2c..b1eb6dd 100644
--- a/prxp.f
+++ b/src/Fortran/prxp.f
@@ -1,5 +1,5 @@
 *----------------------------------------------------------------------*     
-* $Id: prxp.f,v 1.2 2003/07/03 13:08:58 vflegel Exp $
+* $Id: prxp.f 150 2003-07-03 13:08:58Z vflegel $
 *----------------------------------------------------------------------*     
 *        Print psa alignment for multiple matches
 *        Version:  File under developpment for release 2.3
diff --git a/psa2msa.f b/src/Fortran/psa2msa.f
similarity index 99%
rename from psa2msa.f
rename to src/Fortran/psa2msa.f
index 8397646..54b4f40 100644
--- a/psa2msa.f
+++ b/src/Fortran/psa2msa.f
@@ -1,6 +1,6 @@
 *       Program psa2msa
 *----------------------------------------------------------------------*     
-* $Id: psa2msa.f,v 2.11 2003/11/28 11:53:33 vflegel Exp $
+* $Id: psa2msa.f 183 2003-11-28 11:53:33Z vflegel $
 *----------------------------------------------------------------------*     
 *       Function: Converts a pfsearch -x output file into Pearson/Fasta
 *                 multiple sequence alignment format  
@@ -49,7 +49,7 @@
      *   (FSEQ,OPTL,OPTU,OPTP,OPTD,NM,NW,IRC)
       If(IRC.NE.0) then
          Write(NERR,'(/,
-     *      ''psa2msa 2.3 revision 5.d'',//
+     *      ''psa2msa 2.3 revision 4'',//
      *      ''Usage: psa2msa [ -dhlpuMW ] [ psa-file | - ] '',
      *      ''[ parameters ]'',//
      *      )')
diff --git a/psdat.f b/src/Fortran/psdat.f
similarity index 91%
rename from psdat.f
rename to src/Fortran/psdat.f
index 9e8637e..938c638 100644
--- a/psdat.f
+++ b/src/Fortran/psdat.f
@@ -1,5 +1,5 @@
 *----------------------------------------------------------------------*     
-* $Id: psdat.f,v 2.5 2003/07/03 13:08:58 vflegel Exp $
+* $Id: psdat.f 150 2003-07-03 13:08:58Z vflegel $
 *----------------------------------------------------------------------*     
 *       Version:  File under developpment for release 2.3
 *----------------------------------------------------------------------*     
diff --git a/ptof.f b/src/Fortran/ptof.f
similarity index 99%
rename from ptof.f
rename to src/Fortran/ptof.f
index 2986797..b4bf343 100644
--- a/ptof.f
+++ b/src/Fortran/ptof.f
@@ -1,6 +1,6 @@
 *       Program ptof 
 *----------------------------------------------------------------------*     
-* $Id: ptof.f,v 2.12 2003/12/01 13:33:04 vflegel Exp $
+* $Id: ptof.f 187 2003-12-01 13:33:05Z vflegel $
 *----------------------------------------------------------------------*     
 *       Function: converts a protein profile into a framesearch profile
 *       Author:   Philipp Bucher
@@ -73,7 +73,7 @@
       Call Repar(FPRF,OPTR,LLLT,RB,RF,RI,RX,RY,RZ,IRC)
       If(IRC.NE.0) then
          Write(NERR,'(/,
-     *      ''ptof 2.3 revision 5.d'',//
+     *      ''ptof 2.3 revision 4'',//
      *      ''Usage: ptof [ -hlrBFIXYZ ] [ profile | - ] '',
      *      ''[ parameters ]'',//
      *      )')
diff --git a/ptoh.f b/src/Fortran/ptoh.f
similarity index 99%
rename from ptoh.f
rename to src/Fortran/ptoh.f
index d07d3e2..1301e30 100644
--- a/ptoh.f
+++ b/src/Fortran/ptoh.f
@@ -1,6 +1,6 @@
 *       Program ptoh 
 *----------------------------------------------------------------------*     
-* $Id: ptoh.f,v 2.11 2003/12/01 13:33:05 vflegel Exp $
+* $Id: ptoh.f 187 2003-12-01 13:33:05Z vflegel $
 *----------------------------------------------------------------------*     
 *       Function: Reformats profile -> hmm: in-fmt=PROSITE / out-fmt=SAM    
 *       Author:   Philipp Bucher
@@ -81,7 +81,7 @@
       Call Repar(FPRF,FNUL,OPTF,OPFF,OPTH,OPTS,RD,RI,DL,IRC)
       If(IRC.NE.0) then
          Write(NERR,'(/,
-     *      ''ptoh 2.3 revision 5.d'',//
+     *      ''ptoh 2.3 revision 4'',//
      *      ''Usage: ptoh [ -fhsFDIL ] [ profile-file | - ] '',
      *      ''[ random-model-file ] [ parameters ]'',//
      *      )')
diff --git a/pxdat.f b/src/Fortran/pxdat.f
similarity index 95%
rename from pxdat.f
rename to src/Fortran/pxdat.f
index ca7f57b..b3ef416 100644
--- a/pxdat.f
+++ b/src/Fortran/pxdat.f
@@ -1,5 +1,5 @@
 *----------------------------------------------------------------------*     
-* $Id: pxdat.f,v 2.4 2003/04/10 11:58:37 vflegel Exp $
+* $Id: pxdat.f 96 2003-04-10 11:58:37Z vflegel $
 *----------------------------------------------------------------------*     
 *       Version:  File under developpment for release 2.3
 *----------------------------------------------------------------------*     
diff --git a/recmd.f b/src/Fortran/recmd.f
similarity index 92%
rename from recmd.f
rename to src/Fortran/recmd.f
index 7b381b9..3c803ea 100644
--- a/recmd.f
+++ b/src/Fortran/recmd.f
@@ -1,5 +1,5 @@
 *----------------------------------------------------------------------*     
-* $Id: recmd.f,v 2.4 2003/07/03 13:08:58 vflegel Exp $
+* $Id: recmd.f 150 2003-07-03 13:08:58Z vflegel $
 *----------------------------------------------------------------------*     
 *       Version:  File under developpment for release 2.3
 *----------------------------------------------------------------------*     
diff --git a/regpr.f b/src/Fortran/regpr.f
similarity index 99%
rename from regpr.f
rename to src/Fortran/regpr.f
index e6e0af8..9b8640a 100644
--- a/regpr.f
+++ b/src/Fortran/regpr.f
@@ -1,5 +1,5 @@
 *----------------------------------------------------------------------*     
-* $Id: regpr.f,v 2.5 2003/07/03 13:08:58 vflegel Exp $
+* $Id: regpr.f 150 2003-07-03 13:08:58Z vflegel $
 *----------------------------------------------------------------------*     
 *       Version:  File under developpment for release 2.3
 *----------------------------------------------------------------------*     
diff --git a/remsa.f b/src/Fortran/remsa.f
similarity index 98%
rename from remsa.f
rename to src/Fortran/remsa.f
index 353fb52..db7525d 100644
--- a/remsa.f
+++ b/src/Fortran/remsa.f
@@ -1,5 +1,5 @@
 *----------------------------------------------------------------------*     
-* $Id: remsa.f,v 1.2 2003/07/03 13:08:58 vflegel Exp $
+* $Id: remsa.f 150 2003-07-03 13:08:58Z vflegel $
 *----------------------------------------------------------------------*     
 *       Version:  File under developpment for release 2.3
 *----------------------------------------------------------------------*     
diff --git a/remsf.f b/src/Fortran/remsf.f
similarity index 98%
rename from remsf.f
rename to src/Fortran/remsf.f
index 5dc6f30..fb39c0f 100644
--- a/remsf.f
+++ b/src/Fortran/remsf.f
@@ -1,5 +1,5 @@
 *----------------------------------------------------------------------*     
-* $Id: remsf.f,v 2.7 2003/07/03 13:08:58 vflegel Exp $
+* $Id: remsf.f 150 2003-07-03 13:08:58Z vflegel $
 *----------------------------------------------------------------------*     
 *       Version:  File under developpment for release 2.3
 *----------------------------------------------------------------------*     
diff --git a/reprf.f b/src/Fortran/reprf.f
similarity index 99%
rename from reprf.f
rename to src/Fortran/reprf.f
index 0391941..d7e2ba0 100644
--- a/reprf.f
+++ b/src/Fortran/reprf.f
@@ -1,5 +1,5 @@
 *----------------------------------------------------------------------*     
-* $Id: reprf.f,v 2.17 2003/11/18 10:50:07 vflegel Exp $
+* $Id: reprf.f 177 2003-11-18 10:50:07Z vflegel $
 *----------------------------------------------------------------------*     
 *       Version:  File under developpment for release 2.3
 *----------------------------------------------------------------------*     
diff --git a/reseq.f b/src/Fortran/reseq.f
similarity index 98%
rename from reseq.f
rename to src/Fortran/reseq.f
index 003b7a9..991ee75 100644
--- a/reseq.f
+++ b/src/Fortran/reseq.f
@@ -1,5 +1,5 @@
 *----------------------------------------------------------------------*     
-* $Id: reseq.f,v 2.12 2003/11/18 10:50:07 vflegel Exp $
+* $Id: reseq.f 177 2003-11-18 10:50:07Z vflegel $
 *----------------------------------------------------------------------*     
 *        Version:  File under developpment for release 2.3
 *----------------------------------------------------------------------*     
diff --git a/rfseq.f b/src/Fortran/rfseq.f
similarity index 96%
rename from rfseq.f
rename to src/Fortran/rfseq.f
index b5079b6..f0a7bd3 100644
--- a/rfseq.f
+++ b/src/Fortran/rfseq.f
@@ -1,5 +1,5 @@
 *----------------------------------------------------------------------*     
-* $Id: rfseq.f,v 2.10 2003/11/18 10:50:07 vflegel Exp $
+* $Id: rfseq.f 177 2003-11-18 10:50:07Z vflegel $
 *----------------------------------------------------------------------*     
 *       Version:  File under developpment for release 2.3
 *----------------------------------------------------------------------*     
@@ -56,8 +56,6 @@
       End do
  4    IX3=I1 
       CSAC=RCIN(2:IX1)
-*      FIXME
-*      Write(NERR,*) 'SEQUENCE_READ=',CSAC
       CSID=RCIN(IX1+1:IX2)
       CSDE=RCIN(IX3:L)
       CSFH=RCIN(2:IX2)
diff --git a/rhmmer.f b/src/Fortran/rhmmer.f
similarity index 98%
rename from rhmmer.f
rename to src/Fortran/rhmmer.f
index f46de77..ce63bd3 100644
--- a/rhmmer.f
+++ b/src/Fortran/rhmmer.f
@@ -1,5 +1,5 @@
 *----------------------------------------------------------------------*     
-* $Id: rhmmer.f,v 2.5 2003/07/03 13:08:58 vflegel Exp $
+* $Id: rhmmer.f 150 2003-07-03 13:08:58Z vflegel $
 *----------------------------------------------------------------------*     
 *       Version:  File under developpment for release 2.3
 *----------------------------------------------------------------------*     
diff --git a/rhmmer2.f b/src/Fortran/rhmmer2.f
similarity index 99%
rename from rhmmer2.f
rename to src/Fortran/rhmmer2.f
index d98ab18..104f926 100644
--- a/rhmmer2.f
+++ b/src/Fortran/rhmmer2.f
@@ -1,5 +1,5 @@
 *----------------------------------------------------------------------*     
-* $Id: rhmmer2.f,v 2.7 2003/11/28 11:57:32 vflegel Exp $
+* $Id: rhmmer2.f 186 2003-11-28 11:57:32Z vflegel $
 *----------------------------------------------------------------------*     
 *       Version:  File under developpment for release 2.3
 *----------------------------------------------------------------------*     
diff --git a/rhnul.f b/src/Fortran/rhnul.f
similarity index 97%
rename from rhnul.f
rename to src/Fortran/rhnul.f
index 6086ac1..fa353ed 100644
--- a/rhnul.f
+++ b/src/Fortran/rhnul.f
@@ -1,5 +1,5 @@
 *----------------------------------------------------------------------*     
-* $Id: rhnul.f,v 2.5 2003/07/03 13:08:58 vflegel Exp $
+* $Id: rhnul.f 150 2003-07-03 13:08:58Z vflegel $
 *----------------------------------------------------------------------*     
 *       Version:  File under developpment for release 2.3
 *----------------------------------------------------------------------*     
diff --git a/schmm.f b/src/Fortran/schmm.f
similarity index 99%
rename from schmm.f
rename to src/Fortran/schmm.f
index b97e20d..69ff906 100644
--- a/schmm.f
+++ b/src/Fortran/schmm.f
@@ -1,5 +1,5 @@
 *----------------------------------------------------------------------*     
-* $Id: schmm.f,v 2.3 2003/03/24 14:46:10 vflegel Exp $
+* $Id: schmm.f 92 2003-03-24 14:47:54Z vflegel $
 *----------------------------------------------------------------------*     
 *       Version:  File under developpment for release 2.3
 *----------------------------------------------------------------------*     
diff --git a/sterr.f b/src/Fortran/sterr.f
similarity index 89%
rename from sterr.f
rename to src/Fortran/sterr.f
index 8f85cee..c6ea5fe 100644
--- a/sterr.f
+++ b/src/Fortran/sterr.f
@@ -1,5 +1,5 @@
 *----------------------------------------------------------------------*     
-* $Id: sterr.f,v 2.4 2003/02/19 08:38:25 vflegel Exp $
+* $Id: sterr.f 59 2003-02-19 08:38:25Z vflegel $
 *----------------------------------------------------------------------*     
 *       Version:  File under developpment for release 2.3
 *----------------------------------------------------------------------*     
diff --git a/wprsm.f b/src/Fortran/wprsm.f
similarity index 99%
rename from wprsm.f
rename to src/Fortran/wprsm.f
index b2afff3..007fb82 100644
--- a/wprsm.f
+++ b/src/Fortran/wprsm.f
@@ -1,5 +1,5 @@
 *----------------------------------------------------------------------*     
-* $Id: wprsm.f,v 2.13 2003/12/09 13:42:42 vflegel Exp $
+* $Id: wprsm.f 188 2003-12-09 13:42:42Z vflegel $
 *----------------------------------------------------------------------*     
 *       Version:  File under developpment for release 2.3
 *----------------------------------------------------------------------*     
diff --git a/wrhmr.f b/src/Fortran/wrhmr.f
similarity index 98%
rename from wrhmr.f
rename to src/Fortran/wrhmr.f
index 285c8f7..cd70ec0 100644
--- a/wrhmr.f
+++ b/src/Fortran/wrhmr.f
@@ -1,5 +1,5 @@
 *----------------------------------------------------------------------*     
-* $Id: wrhmr.f,v 2.4 2003/03/26 14:40:29 vflegel Exp $
+* $Id: wrhmr.f 93 2003-03-26 14:40:29Z vflegel $
 *----------------------------------------------------------------------*     
 *       Version:  File under developpment for release 2.3
 *----------------------------------------------------------------------*     
diff --git a/wrprf.f b/src/Fortran/wrprf.f
similarity index 99%
rename from wrprf.f
rename to src/Fortran/wrprf.f
index 9482aa0..391113b 100644
--- a/wrprf.f
+++ b/src/Fortran/wrprf.f
@@ -1,5 +1,5 @@
 *----------------------------------------------------------------------*     
-* $Id: wrprf.f,v 2.9 2003/11/18 10:52:29 vflegel Exp $
+* $Id: wrprf.f 179 2003-11-18 10:52:29Z vflegel $
 *----------------------------------------------------------------------*     
 *       Version:  File under developpment for release 2.3
 *----------------------------------------------------------------------*     
diff --git a/wrsam.f b/src/Fortran/wrsam.f
similarity index 98%
rename from wrsam.f
rename to src/Fortran/wrsam.f
index 809c705..94bdac0 100644
--- a/wrsam.f
+++ b/src/Fortran/wrsam.f
@@ -1,5 +1,5 @@
 *----------------------------------------------------------------------*     
-* $Id: wrsam.f,v 2.4 2003/03/26 14:40:29 vflegel Exp $
+* $Id: wrsam.f 93 2003-03-26 14:40:29Z vflegel $
 *----------------------------------------------------------------------*     
 *       Version:  File under developpment for release 2.3
 *----------------------------------------------------------------------*     
diff --git a/xali1.f b/src/Fortran/xali1.f
similarity index 99%
rename from xali1.f
rename to src/Fortran/xali1.f
index 39b4953..ec10e6f 100644
--- a/xali1.f
+++ b/src/Fortran/xali1.f
@@ -1,5 +1,5 @@
 *----------------------------------------------------------------------*     
-* $Id: xali1.f,v 2.6 2003/01/15 14:49:05 vflegel Exp $
+* $Id: xali1.f 46 2003-01-15 14:49:05Z vflegel $
 *----------------------------------------------------------------------*     
 *       Version:  File under developpment for release 2.3
 *----------------------------------------------------------------------*     
diff --git a/xalip.f b/src/Fortran/xalip.f
similarity index 99%
rename from xalip.f
rename to src/Fortran/xalip.f
index 122e98d..6c21c19 100644
--- a/xalip.f
+++ b/src/Fortran/xalip.f
@@ -1,5 +1,5 @@
 *----------------------------------------------------------------------*     
-* $Id: xalip.f,v 2.7 2003/01/15 14:50:24 vflegel Exp $
+* $Id: xalip.f 47 2003-01-15 14:50:24Z vflegel $
 *----------------------------------------------------------------------*     
 *       Version:  File under developpment for release 2.3
 *----------------------------------------------------------------------*     
diff --git a/xalit.f b/src/Fortran/xalit.f
similarity index 99%
rename from xalit.f
rename to src/Fortran/xalit.f
index 24394be..bfa46db 100644
--- a/xalit.f
+++ b/src/Fortran/xalit.f
@@ -1,5 +1,5 @@
 *----------------------------------------------------------------------*     
-* $Id: xalit.f,v 2.9 2003/04/11 13:43:53 vflegel Exp $
+* $Id: xalit.f 107 2003-04-11 13:43:53Z vflegel $
 *----------------------------------------------------------------------*     
 *       Version:  File under developpment for release 2.3
 *----------------------------------------------------------------------*     
diff --git a/xprsm.f b/src/Fortran/xprsm.f
similarity index 96%
rename from xprsm.f
rename to src/Fortran/xprsm.f
index 881fea4..c689252 100644
--- a/xprsm.f
+++ b/src/Fortran/xprsm.f
@@ -1,5 +1,5 @@
 *----------------------------------------------------------------------*     
-* $Id: xprsm.f,v 2.12 2003/12/09 13:42:42 vflegel Exp $
+* $Id: xprsm.f 188 2003-12-09 13:42:42Z vflegel $
 *----------------------------------------------------------------------*     
 *       Version:  File under developpment for release 2.3
 *----------------------------------------------------------------------*     
@@ -47,7 +47,7 @@
       Character*13      CHLE
       Character*20      CHNS
       Character*17      CHRS 
-      Character*64      CHLO
+      Character*21      CHLO
       Character*21      CHSE
       Character*17      CHTY
       
@@ -57,7 +57,7 @@
       Character*24      CHPE
       Character*09      CHST 
       Character*64      CHER 
-      Character*64      CHMN 
+      Character*21      CHMN 
       Character*22      CHRN 
       Character*26      CHPN 
       
@@ -221,9 +221,8 @@
 * - location in profile
 
          If(OPTZ) then
-*            CHPS='motif_start= '
-*            Write(CHPS(14:),*) IPMB
-            Write(CHPS,'(''motif_start='',I7)') IPMB
+            CHPS='motif_start= '
+            Write(CHPS(14:),*) IPMB
             J1=12
             Do I1=13,Lblnk(CHPS)
                If(CHPS(I1:I1).NE.' ') then 
@@ -232,9 +231,8 @@
                   CHPS(I1:I1)=' '
                End if
             End do
-*            CHPE='motif_end= '
-*            Write(CHPE(12:),*) IPME
-            Write(CHPE,'(''motif_end='',I7)') IPME
+            CHPE='motif_end= '
+            Write(CHPE(12:),*) IPME
             J1=10
             Do I1=11,Lblnk(CHPE)
                If(CHPE(I1:I1).NE.' ') then 
diff --git a/xpsa.5 b/xpsa.5
deleted file mode 100644
index 16b73f2..0000000
--- a/xpsa.5
+++ /dev/null
@@ -1,370 +0,0 @@
-.\"
-.\" $Id: xpsa.5,v 1.2 2003/04/28 13:50:24 vflegel Exp $
-.\" Copyright (c) 2003 Volker Flegel <Volker.Flegel at isb-sib.ch>
-.\" Process this file with
-.\" groff -man -Tascii <name>
-.\" for ascii output or
-.\" groff -man -Tps <name>
-.\" for postscript output
-.\"
-.TH XPSA 5 "April 2003" "pftools 2.3" "File formats"
-.\" ------------------------------------------------
-.\" Name section
-.\" ------------------------------------------------
-.SH NAME
-xpsa \- extended psa header
-.\" ------------------------------------------------
-.\" Description section
-.\" ------------------------------------------------
-.SH DESCRIPTION
-.B xpsa
-is an extension of the
-.BR psa (5)
-file format used by the
-.B pftools
-package to describe and store biological sequences.
-.PP
-.B xpsa
-uses
-.IR keyword = value
-pairs in the header to include information about the sequence or the alignment
-between the sequence and a
-.I PROSITE
-profile (or any other kind of motif). The syntax is therefore easily extensible. In this man-page, we focus on 
-the keywords defined and used by the
-.B pftools
-package. 
-.PP
-In the following text we will use the more general term
-.RI ' motif '
-when in fact our discussion refers specifically to
-.IR "PROSITE profiles" .
-Nevertheless the keywords defined here can be used by any kind of sequence analysis tool
-to store and transfer information.
-.PP
-None of the defined keywords are mandatory and analysis tools have often a length limit imposed
-on the header line. In order to keep the header line reasonnably short and user readable,
-these tools can easily remove individual
-.IR keyword = value
-pairs which are not important to the specific task at hand.
-.\" ------------------------------------------------
-.\" Syntax section
-.\" ------------------------------------------------
-.SH SYNTAX
-The general syntax of the
-.B xpsa
-header is given below. For examples please refer to the corresponding
-.I examples
-section.
-.PP
-The biological sequence itself starts on the next line following the header and may extend over several lines.
-If several sequences are contained in the same file, each must be preceded by a header line.
-.PP
-.sp
-Syntax of the header line:
-.sp
-.RS
-.BI > seq_id / seq_pos
-{
-.RI "[ "  keyword = value " | " free_text " ]" 
-}
-.RE
-.sp
-The header must start with a
-.RB ' > '
-followed by the fields detailed below:
-.RS
-.\" --- seq_id ---
-.TP
-.I seq_id
-typically the 
-.IR identifier \ or\  accession
-number of the sequence. This text field should not contain any spaces.
-.\" --- seq_pos ---
-.TP
-.I seq_pos
-this field describes the sequence coordinates where a
-motif matches. The positions are generally given as
-.IR start_pos \- end_pos
-pairs.
-.br
-If present, this field is separated from the
-.I seq_id
-by a
-.RB ' / '
-character.
-.\" --- keyword=value ---
-.TP
-.IR keyword = value
-is an optional list of defined 
-.IR keyword = value
-pairs. Each pair should be separated from the next or from free text by whitespaces.
-.br
-The
-.I keyword
-is case sensitive in the current implementation of the
-.B pftools
-package. It should not exceed 24 characters in length.
-.br
-The
-.I value
-can be numeric or alphanumeric. Values containing whitespaces should be enclosed in either
-.I single quotes
-or
-.IR "double quotes" .
-If the same type of quote appears inside the value it must be escaped using the
-.RB ' \(rs '
-character.
-.RS
-.TP
-Note:
-the
-.B pftools
-do not currently produce quote enclosed values.
-.RE
-.\" --- free_text ---
-.TP
-.I free_text
-typically this is a description of the sequence. It should not contain any of the defined
-.IR keyword = value
-pairs.
-.PP
-.RE
-Keywords used by the
-.BR pfsearch "(1) and " pfscan (1)
-programs:
-.RS
-.\" --- level ---
-.TP
-.I level
-the highest cut-off level (as a value) exceeded by the alignment.
-.br
-The characters
-.RB ' NA '
-indicate that the alignment score does not exceed any of the cut-off levels defined in the motif.
-.\" --- level_tag ---
-.TP
-.I level_tag
-the highest cut-off level (as a character string) exceeded by the alignment.
-.br
-The characters
-.RB ' NA '
-indicate that the alignment score does not exceed any of the cut-off levels defined in the motif.
-.RS
-.TP
-Note:
-.BR pfsearch "(1) and " pfscan (1)
-only report the first 2 characters of the level text string.
-.RE
-.\" --- match_nb ---
-.TP
-.I match_nb
-if the motif matches several times on the same sequence, each alignment is numbered incrementally.
-.br
-If the motif is circular, each single repeat is numbered incrementally with the key 
-.I repeat_nb
-(see below).
-.\" --- match_parent ---
-.TP
-.I match_parent
-for each single match of a circular motif, this key references the number of the parental total match of the circular
-motif.
-.RS
-.TP
-Note:
-if a circular motif matches only once on a given sequence,
-.BR pfsearch "(1) and " pfscan (1)
-do not report this key.
-.RE
-.\" --- match_type ---
-.TP
-.I match_type
-identifies the type of match. Either
-.B region
-for a complete match of a motif to a sequence, or
-.B repeat
-for a single repeat of a circular motif.
-.\" --- motif ---
-.TP
-.I motif
-the name or identifier of the motif.
-.\" --- motif_start ---
-.TP
-.I motif_start
-the motif position where the alignment begins.
-.\" --- motif_end ---
-.TP
-.I motif_end
-negative offset from the end of the alignment to the end of the motif.
-.\" --- norm_score ---
-.TP
-.I norm_score
-the normalized score of the alignment.
-.\" --- raw_score ---
-.TP
-.I raw_score
-the raw score of the alignment.
-.\" --- repeat_nb ---
-.TP
-.I repeat_nb
-if the motif is circular, each individual repeat is numbered incrementally with this keyword.
-.\" --- seq_end ---
-.TP
-.I seq_end
-negative offset from the end of the alignment to the end of the sequence.
-.br
-In combination with the information given by 
-.I seq_pos
-this allows to deduce the length of the query sequence.
-.\" --- strand ---
-.TP
-.I strand
-the sequence strand on which the motif matches, when the search includes the reverse complement of a DNA sequence.
-The
-.I value
-is either
-.B s
-for the sens or
-.B r
-for the reverse strand.
-.PP
-.RE
-Keywords used by the
-.BR pfmake "(1) and " pfw (1)
-programs:
-.RS
-.\" --- weight ---
-.TP
-.I weight
-the weight of a given sequence in a multiple alignment.
-.\" ------------------------------------------------
-.\" Examples section
-.\" ------------------------------------------------
-.SH EXAMPLES
-.TP
-(1)
->PEX7/73-315
-.IR motif =WD_REP
-.IR raw_score =1336
-.IR match_nb =1
-.IR match_type =region
-.IR seq_end =-491 
-.br
-VTW[...]IYD
-.br
->PEX7/540-801
-.IR motif =WD_REP
-.IR raw_score =1378
-.IR match_nb =2
-.IR match_type =region
-.IR seq_end =-5 
-.br
-SFD[...]PAS
-.br
-
-The 2 headers above describe 2 matches of the motif called
-.RI ' WD_REP '
-onto the sequence
-.RI ' PEX7 '.
-Each of the matches onto this single sequence is numbered using the the
-.I match_nb
-keyword.
-These matches are not individual repeats of a circular motif as can be seen with the
-.I region
-value of the
-.I match_type
-keyword.
-.br
-The first match starts at position 73 of the sequence and ends at position 315. This position is 491
-residues away from the end of the input sequence
-.RI ( seq_end ).
-.br
-The next line following the
-.BR xpsa (5)
-header line is the sequence of the match (it has been truncated here to help readability).
-.br
-The second match begins at position 540 of the sequence and terminates 5 residues before the end of the
-input sequence, that is at position 801.  
-.RE
-
-.TP
-(2)
->PEX7/540-582
-.IR motif =WD_REP
-.IR norm_score =7.437
-.IR raw_score =180
-.IR match_parent =2
-.IR repeat_nb =1
-.IR match_type =repeat
-.IR level =-1
-.IR seq_end =-224
-.IR motif_start =1
-.IR motif_end =-1 
-.br
-SFD[...]PLQ
-.br
-
-This example illustrates the kind of header obtained when aligning a circular motif
-to a sequence. Each match of this motif (which we will call
-.I total
-match) can be composed of several individual repeats of the motif. Tools like
-.BR pfsearch "(1) and " pfscan (1)
-can output each total match followed by all its individual repeats. In this example
-we only show one of the indiviual repeats that is part of a total match between a circular profile
-and a sequence.
-.br
-The
-.BR xpsa (5)
-header above describes a single repeat of a match between a circular motif called 
-.RI ' WD_REP '
-and the sequence
-.RI ' PEX7 '.
-.br
-This is the first individual repeat of a match of the circular motif, as identified by the
-.I repeat_nb
-keyword. The other individual repeats have not been listed in this example.
-.br
-The total circular motif has at least 2 distinct matches on the
-.RI ' PEX7 '
-sequence, because this single repeat is part of the second match as described by the
-.I match_parent
-keyword. The parental matches have been ommited from this example, they would be numbered using the
-.I match_nb
-keyword.
-.br
-The normalized score of this motif exceeds the cut-off level number -1 
-.RI ( level
-keyword) which is specified in the motif.
-.br
-This match starts at position 1 of the profile
-.RI ( motif_start )
-and position 540 of the sequence, it ends at the end of the motif
-.RI ( motif_end =-1)
-and position 582 of the sequence.
-.br
-The next line following the
-.BR xpsa (5)
-header line is the sequence of the match (it has been truncated here to help readability).
-.RE
-.\" ------------------------------------------------
-.\" See also section
-.\" ------------------------------------------------
-.SH "SEE ALSO"
-.BR psa (5),
-.BR pfsearch (1),
-.BR pfscan (1),
-.BR pfw (1),
-.BR pfmake (1),
-.BR psa2msa (1)
-.\" ------------------------------------------------
-.\" Author section
-.\" ------------------------------------------------
-.SH "AUTHOR"
-This manual page was originally written by Volker Flegel.
-.br
-The
-.B pftools
-package was developped by Philipp Bucher.
-.br
-Any comments or suggestions should be addressed to <pftools at isb-sib.ch>.
-

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/pftools.git



More information about the debian-med-commit mailing list