]> granicus.if.org Git - php/commitdiff
If asked to populate a set of cflags for a header check, only populate the
authorWez Furlong <wez@php.net>
Thu, 7 Jul 2005 13:22:38 +0000 (13:22 +0000)
committerWez Furlong <wez@php.net>
Thu, 7 Jul 2005 13:22:38 +0000 (13:22 +0000)
flags and don't fill in an entry into config.w32.h, UNLESS explicitly told
what to do.

This prevents leakage of things like HAVE_SQLCLI1_H from one pecl into another
(or the core) and confusing the build (as has happened with ibm_db2 and
pdo_odbc).

win32/build/confutils.js

index 4546ff5c254b1be64817dffacbd8c4903d05cdb0..b99d7d1a4f812f553c143c810b4b279a97884ace 100644 (file)
@@ -17,7 +17,7 @@
   +----------------------------------------------------------------------+
 */
 
-// $Id: confutils.js,v 1.57 2005-06-09 13:09:04 wez Exp $
+// $Id: confutils.js,v 1.58 2005-07-07 13:22:38 wez Exp $
 
 var STDOUT = WScript.StdOut;
 var STDERR = WScript.StdErr;
@@ -815,10 +815,15 @@ function CHECK_HEADER_ADD_INCLUDE(header_name, flag_name, path_to_check, use_env
        sym = header_name.toUpperCase();
        sym = sym.replace(new RegExp("[\\\\/\.-]", "g"), "_");
 
+       if (typeof(add_to_flag_only) == "undefined" &&
+                       flag_name.match(new RegExp("^CFLAGS_(.*)$"))) {
+               add_to_flag_only = true;
+       }
+
        if (typeof(add_to_flag_only) != "undefined") {
                ADD_FLAG(flag_name, "/DHAVE_" + sym + "=" + have);
        } else {
-               AC_DEFINE("HAVE_" + sym, have);
+               AC_DEFINE("HAVE_" + sym, have, "have the " + header_name + " header file");
        }
 
        return p;