// equivalent.
ARG_WITH('cygwin', 'Path to cygwin utilities on your system', '\\cygwin');
-
PATH_PROG('cl');
-PATH_PROG('link');
+
+// cygwin now ships with link.exe. Avoid searching the cygwin path
+// for this, as we want the MS linker, not the fileutil
+PATH_PROG('link', WshShell.Environment("Process").Item("PATH"));
+
PATH_PROG('nmake');
+
// we don't want to define LIB, as that will override the default library path
// that is set in that env var
PATH_PROG('lib', null, 'MAKE_LIB');
-PATH_PROG('bison');
-PATH_PROG('flex');
+if (!PATH_PROG('bison')) {
+ ERROR('bison is required')
+}
+if (!PATH_PROG('flex')) {
+ ERROR('flex is required')
+}
PATH_PROG('re2c');
PATH_PROG('zip');
PATH_PROG('lemon');
+
+// avoid picking up midnight commander from cygwin
PATH_PROG('mc', WshShell.Environment("Process").Item("PATH"));
+
ARG_ENABLE('debug', 'Compile with debugging symbols', "no");
ARG_ENABLE('debug-pack', 'Release binaries with external debug symbols (--enable-debug must not be specified)', 'no');
if (PHP_DEBUG == "yes" && PHP_DEBUG_PACK == "yes") {