Re: [PHP4BETA] compiling for win32
| From: | Philippe Verdy | Date: | Sun, 08 Aug 1999 18:17:11 +0000 |
| Subject: | Re: [PHP4BETA] compiling for win32 | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-3212@lists.php.net to get a copy of this message | ||
There's an alternative to GNU MingW32 and CygWin32: it's very clean,
integrates Unix tools nicely, and does really support the integration of an
Unix Kernel within the Win32 environement (i.e. you may mix Win32 API and
Unix API). More: it runs on Win95 and Win98.
This is called "UWin", by AT&T Research Labs. It's free, but it's not
OpenSource. It comes with a convenient ksh implementation.
Also you need an implementation of flex and bison (aka lex and yacc, but
with better behavior). You may download the latest source packages from
www.gnu.org in .tar.gz format. But if you don't have an Unix shell to
compile them, you just need to create your own "config.h" file, and create a
simple MSDEV project that include all the needed C source files.
As an example of a "config.h" created without using the configuration script
(which requires a shell runtime):
---begin---
/* "bison-1.28/src/config.h" for MS Visual C++ */
#ifndef BISON_CONFIG_H
#define BISON_CONFIG_H
#define VERSION_STRING "GNU Bison version 1.28"
#define PARAMS(x) x
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_MEMORY_H 1
#define HAVE_CTYPE_H 1
#define HAVE_ISASCII 1
#define HAVE_LOCALE_H 1
#define HAVE_SETLOCALE 1
#define XPFILE "c:/download/gnu/bison.simple"
#define XPFILE1 "c:/download/gnu/bison.hairy"
#endif /* BISON_CONFIG_H */
---end---
Note: the original bison and flex sources DOES NOT have the undocumented
options that specify the location of the skeleton file.
This location is either built-in in the configuration file where you will
install these tools, or specified in environment variables.
Shame: the current project workspaces for PHP4 makes use of these
undocumented options, and/or specifies hard locations to CygWin32
installation directories. You'll have to patch these project workspaces to
make them work on your development system. These undocumented options of
flex and bison produce errors by bison and flex at compîle time if you don't
patch the project workspaces. Without these options, you should launch
MS-DevStudio from a command-line by first setting the environment variables
to the appropriate skeleton files.
Shame again: PHP4 does not use the default skeleton files, but provide its
own versions. I wonder why !!? I was able to compile libzend in thread safe
version without using these modified skeleton files, i.e. using the standard
skeletons that come with bison and flex, and which locations can be
configured globally on the development system without requiring to exit
DevStudio and relauching it with different environment variables settings.
----- Original Message -----
From: David Norris <kg9ae@geocities.com>
To: Egon Schmid <eschmid@stuttgart.netsurf.de>; <zeev@zend.com>
Cc: PHP4 <php4beta@lists.php.net>
Sent: Friday, August 06, 1999 1:00 PM
Subject: RE: [PHP4BETA] compiling for win32
> >> Where do we find that package?
> > I think he means Cygnus Cygwin compiler. In Germany there exists a port
> > named CAMP (Cygnus Apache MySQL PHP):
>
> CygWin32 is a Unix on Windows compiler/emulator. MingW32 is a
> reimplementation of GCC et al for Windows. (There is a CygWin32 vs.
MingW32
> comparison on the MingW32 web site.) Basically, MingW32 doesn't make any
> attempt to allow Unix code run on Windows. The goal of MingW32 is to make
> Windows code compile on Windows. Originally, it was simply a set of
Windows
> libraries and headers for CygWin32. Now, it is a complete port of GCC to
> Windows. And, it looks like a pretty sturdy one at that.
>
> ,David Norris
>
> World Wide Web -
> http://www.geocities.com/CapeCanaveral/Lab/1652/
> Home Computer - http://illusionary.tzo.cc/
> Page via mail - 412039@pager.mirabilis.com
> ICQ Universal Internet Number - 412039
> E-Mail - kg9ae@geocities.com
>
>
> --
> PHP 4 Beta
>
>