Dear calc user on a Windows based system,

See the HOWTO.INSTALL file for information on how to build and install calc.
See also the README file.

BTW: While we are unable to use Windows 11, we welcome
     Windows 11 developers to try compiling calc natively
     (instead of via a Linux virtual machine).  If you are
     able to compile Windows 11 natively, we would welcome
     GitHub pull requests showing any needed modifications:

	https://github.com/lcn2/calc/pulls

     Please also add notes to the 'Compiling calc under Windows 11'
     section in README.WINDOWS file.

NOTE: The main developers do not have access to a Windows based platform.
      While we will make an effort to not break calc Windows based system,
      our lack of a Windows test environment will mean we will make mistakes
      from time to time.  Hopefully Windows users can overcome these mistakes.
      Of course you are welcome to send us any patches that fix your
      Windows build environment.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=-= Compiling calc under Windows 11 =-=
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

We were given this advice from a Windows 11 developer:

    Windows 11 users could use Cygwin:

        https://cygwin.com/install.html

    IMPORTANT: While installing Cygwin, and during Cygwin Setup, be sure to
	       select all the MinGW64 packages relating to gcc.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=-= Compiling calc via virtual machine under Windows 11 =-=
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

We would prefer a Windows 11 solution that does not require a Windows 11
developer to install a Linux virtual machine.  Nevertheless, a Windows 11
user might want to use the Microsoft Windows Subsystem (WSL) for Linux:

	https://docs.microsoft.com/en-us/windows/wsl/

    We have been told that you will need to turn on virtualization
    to use this WSL subsystem.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=-= Compiling calc under Windows 10 via Windows Subsystem for Linux (WSL) =-=
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

It has been reported that calc version 2.12.6.4 has been successfully
compiled, installed and running on Windows 10 on 2018 Jan 21.

We were told:

  "The Windows Subsystem for Linux (WSL) is a new Windows 10 feature that
   enables you to run native Linux command-line tools directly on Windows"

   https://docs.microsoft.com/cs-cz/windows/wsl/about

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=-= compiling with Cygwin =-=
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

An effort is being made to allow windows users to compile calc using the
Cygwin project (http://sources.redhat.com/cygwin/) with the GCC compiler
and Un*x tools for Windows.

The major porting work for Cygwin was performed by Thomas Jones-Low
(tjoneslo at softstart dot com).

In March 2009, Michael Penk (mpenk at wuska dot com) reported success in
installs under Cygwin:

    On my fairly complete Cygwin installs, everything compiles,
    checks, and installs correctly.  My Cygwin is configured
    in a very standard way (out of the box, using all of Cygwin's
    defaults).  The install worked on 5 different machines with
    Cygwin on them: one XP home, one XP professional, and three
    Vista professionals.

Using the calc Makefile, he did the following:

    make all target=Cygwin
    make check
    make install

He also reports:

    Of course, one should be logged in as an Administrator when
    one builds and installs calc.

He was compiling calc 2.12.4.0 with Cygwin version 1.5.25-15.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=-= If all else fails, for Cygwin =-=
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Much earlier (2001?) Thomas Jones-Low (tjoneslo at softstart dot com)
recommended that you generate by hand all of the header files that
by the Makefile.  This has been done for you via the makefile rule:

	make win32_hsrc

which uses the Makefile variables in win32.mkdef to form these header
files under win32 directory.

You will find generated versions of these files located in the win32
sub-directory.  These files may be appropriate for your Cygwin building
needs.

In particular:

    Just copy the win32/*.[ch] files up into the top level calc
    source directory, edit them (if needed) and build using the
    Cygwin GCC compiler and Cygwin build environment.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=-= compiling under DJGPP =-=
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

You might want to try using the DJGPP system to compile calc.  See:

	http://www.delorie.com/djgpp/

for DJGPP details and availability.

To compile with DJGPP, one needs to select a number of Makefile
variable changes.  Eli Zaretskii <eliz at is dot elta dot co dot il>
recommends the following settings:

	TERMCONTROL= -DUSE_TERMIOS
	BYTE_ORDER= -DLITTLE_ENDIAN
	LONG_BITS= 32
	HAVE_FPOS_POS= -DHAVE_NO_FPOS_POS
	FPOS_BITS= 32
	OFF_T_BITS= 32
	DEV_BITS= 32
	INODE_BITS= 32
	HAVE_USTAT= -DHAVE_NO_USTAT
	HAVE_GETSID= -DHAVE_NO_GETSID
	HAVE_GETPGID= -DHAVE_NO_GETPGID
	HAVE_GETTIME= -DHAVE_NO_GETTIME
	HAVE_GETPRID= -DHAVE_NO_GETPRID
	HAVE_URANDOM_H= NO
	ALIGN32= -UMUST_ALIGN32
	HAVE_MALLOC_H= YES
	HAVE_STDLIB_H= YES
	HAVE_STRING_H= YES
	HAVE_TIMES_H= NO
	HAVE_SYS_TIMES_H= YES
	HAVE_TIME_H= YES
	HAVE_SYS_TIME_H= YES
	HAVE_UNISTD_H= YES
	BINDIR= /dev/env/DJDIR/bin
	INCDIR= /dev/env/DJDIR/include
	LIBDIR= /dev/env/DJDIR/lib
	MANDIR= /dev/env/DJDIR/man/man1
	CATDIR= /dev/env/DJDIR/man/cat1
	NROFF= groff
	CALCPATH= .;./cal;~/.cal;${CALC_SHAREDIR};${CUSTOMCALDIR}
	CALCRC= ./.calcinit;~/.calcrc;${CALC_SHAREDIR}/startup
	CALCPAGER= less.exe -ci
	DEBUG= -O2 -gstabs+ -D_WIN32
	HAVE_ENVIRON=-DHAVE_NO_ENVIRON
	HAVE_ARC4RANDOM=-DHAVE_NO_ARC4RANDOM

The 'Linux set' or 'gcc set' (see the Select your compiler type section)
should work for DJGPP systems if you set the above Makefile variables.

Look for Makefile comments of the form:

	# Select ...something... for DJGPP.

Follow those recommendations.  In cases where they conflict with
the above Makefile list, follow the recommendation in the Makefile.


## Copyright (C) 2002-2009,2021  Landon Curt Noll and Thomas Jones-Low
##
## Calc is open software; you can redistribute it and/or modify it under
## the terms of the version 2.1 of the GNU Lesser General Public License
## as published by the Free Software Foundation.
##
## Calc 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 Lesser General
## Public License for more details.
##
## A copy of version 2.1 of the GNU Lesser General Public License is
## distributed with calc under the filename COPYING-LGPL.  You should have
## received a copy with calc; if not, write to Free Software Foundation, Inc.
## 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
##
## Under source code control:	2001/02/25 14:00:05
## File existed as early as:	2001
##
## chongo <was here> /\oo/\	http://www.isthe.com/chongo/
## Share and enjoy!  :-)	http://www.isthe.com/chongo/tech/comp/calc/
