# config.w32 quirk

- Thread: https://externals.io/message/25350
- Original archive: https://news-web.php.net/php.internals/25350
- Started by Frank M. Kromann on 2006-08-14T19:25:35+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #25350 — Frank M. Kromann — 2006-08-14T19:25:35+00:00

URL: https://externals.io/message/25350#25350

That has to do with the way the config.w32 files are processed.

changing one line in win32\build\buildconf.js from

re = new RegExp("(ARG_(ENABLE|WITH)\([^;]+\);)", "gm");

to

re = new RegExp("^(ARG_(ENABLE|WITH)\([^;]+\);)", "gm");

will prevent this from happening. This change will require the ARG_ to
start a the begining of the line.

Unless there are any reasons not to do this, I'll commit the patch.

- Frank

> I had this in a config.w32 file:
> 
> ARG_ENABLE("winbinder", "winbinder support", "no");
> //ARG_WITH("winbinder", "winbinder support", "no");
> 
> line 2 is not treated as comment and after buildconf
> cscript configure.js --help
> both --enable-winbinder and --with-winbinder
> were listed as availabe options.
> 
> Don't know if this is a bug.
> 
> Davide.

---

## #25351 — Stut — 2006-08-14T20:01:58+00:00

URL: https://externals.io/message/25350#25351 · In reply to: #25350

Frank M. Kromann wrote:
> That has to do with the way the config.w32 files are processed.
> 
> changing one line in win32\build\buildconf.js from
> 
> re = new RegExp("(ARG_(ENABLE|WITH)\([^;]+\);)", "gm");
> 
> to
> 
> re = new RegExp("^(ARG_(ENABLE|WITH)\([^;]+\);)", "gm");
> 
> will prevent this from happening. This change will require the ARG_ to
> start a the begining of the line.

No need for such a requirement. I don't know whether the JS regex is
PCRE or not, but I believe something like this will solve that issue...

re = new RegExp("^\s*(ARG_(ENABLE|WITH)\([^;]+\);)", "gm");

-Stut
