This is a port of PCRE 8.33 to MSDOS/DJGPP.


  The PCRE library is a set of functions that implement regular expression
  pattern matching using the same syntax and semantics as Perl 5.  PCRE has
  its own native API, as well as a set of wrapper functions that correspond
  to the POSIX regular expression API.



1.:     DJGPP specific changes.
        =======================

        To configure and compile this port you will need an OS with LFN support.
        The product itself will even work on systems that have only SFN support.
        The usual stuff to configure the sources have been added.  As usual,
        it is stored together with the diffs file that documents my chenges in
        the /djgpp directory.  The port has been configured to support gzip and
        bzip2 compressed files.  The binaries will detect at runtime if LFN or
        SFN support is available.  If there is LFN support available then only
        the default extensions ".bz2" and ".gz" will be used and no other ones
        will be honored.  But if only SFN support is available, then also
        ".*bz" will be accepted as a valid bzip2 extension and in the case of
        gzip compressed files also ".*gz" and ".**z" will be accepted as valid
        extensions, where "*" always stands for any valid character.
        If a file with a valid bzip2 or gzip extension can not be opened using
        the appropriate compressor library functions, it will be treated as an
        uncopressed file and will be opened as a plain file.  Please note that
        all files are opened in binary mode and that neither the original code
        nor this port offers any way to change this behaviour.
        The library can be configured to accept different EOL characters.
        I have choosen to configure this port using the option to enable any
        EOL characters.  This means that CR, LF and CRLF will be recognized
        as valid EOL character.  If you do not like this, you will have to
        reconfigure and recompile the sources passing the option you prefer.
        The following command line options are available:
          cr: enables CR as EOL
          lf: enables LF as EOL
          crlf: enables CRLF as EOL
          any-crlf: enables CR, LF and CRLF as EOL
        Also the following command line options are available to disable any
        of the EOL characters:
          no-cr: disables CR as EOL
          no-lf: disables LF as EOL
          no-crlf: disables CRLF as EOL
          no-any-crlf: disables CR, LF and CRLF as EOL
        Enabling one of them disables all of the other ones.  This concerns
        only the library.  The EOL character used by pcregrep can always be
        controlled with the -N command line option.  Please note that this
        choice has the consequence that if you have a string looking like
        this:
          foo\r\nbar
        pcre library and pcregrep will find 2 EOLs.  One for \r and one for \n.
        In other words the following two sequences "CRCRLF" and "LFCRLF" will
        always produce two EOL matches.  The "CRCRLF" sequence will produce one
        match for the first CR and a second one for the following CRLF.  The
        "LFCRLF" sequence will produce a match for the first LF and a second
        match for the following CRLF.  Please note that this behaviour differs
        from the DJGPP's port of grep.  It was not my intention to modify the
        pcre code in such a drastic way to be able to emulation DJGPP's grep
        behaviour.  pcregrep.exe also offers ansi.sys-less color support in
        the same way than the grep port does.
        Please also note that I have not configured the port to support neither
        UTF-8 Unicode character strings nor any UTF-8 EOL character sequence.

        Neither the Just-In-Time compiling support for the library nor the JIT
        support for pcregrep are supported by me.  I have checked the code to
        see if there are DOS specific issues to fix but I did not found any.
        To compile it you will need to install some pthread library together
        with a socket library.  I have never used this kind of libraries on DOS
        with DJGPP so I am not able to support JIT.  If you want to try you are
        alone.

        The pcretest.exe binary will not support the -S command line option that
        allows to change the program stack.  This is because DJGPP's setrlimit
        does not support this feature.  The port has been configure to use the
        readline and history library.  If you do not like this you will have to
        reconfigure the sources passing the "no-rl" command line option to
        config.bat.  The default is always that readline is used.

        The port passes the test suite except for the last test.  This test is
        completely UNIX or LF centric and does not work well with any other EOL
        encoding than the one used on posix systems.  This is known by the
        author/maintainer of the package and I have no plans to write a CRLF
        specific test case for the DJGPP port.

        Certain man and html pages have been renamed to fit into the SFN limits.
        The index.html has been adjusted accordingly.

        Please *read* the docs to become familiar with the products.



2.:     Installing the binary package.
        ==============================

2.1.:   Copy the binary distribution into the top DJGPP installation directory,
        just unzip it preserving the directory structure running *ONE* of the
        following commands:
          unzip32 pcre833b.zip      or
          djtarx pcre833b.zip       or
          pkunzip -d pcre833b.zip



3.:     Building the binaries from sources.
        ===================================

3.1.:   Create a temporary directory and copy the source package into the
        directory and just unzip it preserving the directory structure
        running *ONE* of the following commands:
          unzip32 pcre833s.zip      or
          djtarx pcre833s.zip       or
          pkunzip -d pcre833s.zip

3.2.:   To build the binaries you will need the following binary packages:
          djdev203.zip (or a later but NOT a prior version)
          bsh205bbr3.zip  (or a later but NOT a prior version)
          gccNNNb.zip, gppNNN.zip, bnuNNNb.zip, makNNNb.zip, filNNNb.zip,
          shlNNNb.zip, txtNNNb.zip, txiNNNb.zip, grepNNNb.zip, sedNNNb.zip,
          gwkNNNb.zip, mktmpNNb.dsm, bz2-NNNa.zip, zlibNNNb.zip
          and rdlnNNNb.zip.

        If you want to run the check you will need also:
          difNNNb.zip

        All this packages can be found in the v2gnu directory of ftp.delorie.com
        and any mirror.  NNN stands for the newest port versions available when
        this port was build but older may do the work as well.

3.3.:   The package has been configured for both DJGPP 2.03 and DJGPP 2.04.
        There is a separate build directory for DJGPP 2.03 and for DJGPP 2.04
        under the top srcdir (aka pcre-8.33).  To build the binaries
        using the 2.03 version of DJGPP cd into _build.203; if you prefer to
        build the binaries using DJGPP 2.04 cd into _build.204.  If for some
        reason you want to reconfigure the package cd into the corresponding
        build directory and run the following commands:
          del config.cache
          make clean
          ..\djgpp\config ./..

        Please note that you *MUST* delete the config.cache file in the top
        srcdir or you will not really reconfigure the sources because the
        configuration informations will be read from the cache file instead
        of being newly computed.

        config.bat, among other things, will start the configure script passing
        to it a couple of arguments.  You can control these argument passing the
        following command line arguments to config.bat:
          nls or no-nls, default no-nls.  No NLS support
          cache or no-cache, default cache.
          dep or no-dep, default no-dep.  No dependency tracking.
          lbz2 or no-lbz2, default lbz2.  Link pcregrep with libbz2 to handle
                                          .bz2 files.
          lz or no-lz, default lz.  Link pcregrep with libz to handle .gz files.
          rl or no-rl, default rl.  Link pcretest with libreadline.
          cr or no-cr, default no-cr.  Do not use CR as newline character.
          lf or no-lf, default no-lf.  Do not use LF as newline character.
          crlf or no-crlf, default no-crlf.  Do not use CRLF as newline
                                             character.
          anycrlf or no-anycrlf, default anycrlf.  Use CR, LF, or CRLF as
                                                   newline sequence.
          cpp or no-cpp, default cpp.  Enable C++ support.
          pcre8 or no-pcre8, default pcre8.  Enable 8 bit character set support
                                             and disables 16 bit character set
                                             support.
          pcre16 or no-pcre16, default no-pcre16.  Disable 8 bit character set
                                                   support and enables 16 bit
                                                   character set support.
          jit or no-jit, default no-jit.  Disable Just-In-Time compiling
                                          support.
          grepjit or no-grepjit, default no-grepjit.  Disable Just-In-Time
                                                      support in pcregrep.
        All other configure specific options are not set by config.bat so their
        values are left as they are.  If no arguments are passed to config.bat
        then the default values are used.

        To build the programs in a directory other than where the sources are,
        you must add the parameter that specifies the source directory,
        e.g:
          x:\src\gnu\pcre-8.33\djgpp\config x:/src/gnu/pcre-8.33

        Lets assume you want to build the binaries in a directory placed on a
        different drive (z:\build in this case) from where the sources are,
        then you will run the following commands:
          z:
          md \build
          cd \build
          x:\src\gnu\pcre-8.33\djgpp\config x:/src/gnu/pcre-8.33

        The order of the options and the srcdir option does not matter.  You
        *MUST* use forward slashes to specify the source directory.

        The batch file will set same environment variables, make MSDOS specific
        modifications to the Makefile.in's and supply all other needed options
        to the configure script.

3.4.:   To compile the package run from the directory where you have configured
        the sources the command:
          make

3.5.:   Now you can run the tests if you like. From the directory where you have
        configured the sources run the command:
          make check

        The test concerning the EOL encodings will fail.  This is known and
        there is no fix for this.

3.6.:   To install the binaries, header, library, catalogs, and info docs
        run the following command from the top srcdir:
          make install

        This will install the products into your DJGPP installation tree given
        by the default prefix "/dev/env/DJDIR".  If you prefer to install them
        into some other directory you will have to set prefix to the appropiate
        value:
          make install prefix=z:/some/other/place



        Send PCRE specific bug reports to the mailing list: <pcre-dev@exim.org>.
        Send suggestions and bug reports concerning the DJGPP port to
        comp.os.msdos.djgpp or <djgpp@delorie.com>.


Enjoy.

        Guerrero, Juan Manuel <juan.guerrero@gmx.de>
