Fix PHP7 config.w32 2/head
authorJan-E <github@ehrhardt.nl>
Fri, 22 Jan 2016 12:27:06 +0000 (13:27 +0100)
committerJan-E <github@ehrhardt.nl>
Fri, 22 Jan 2016 12:27:06 +0000 (13:27 +0100)
config.w32

index 939cc1bb08107f2495a6276832a7450911413c78..7a09923d515edbd02d753c7e3e2fc59ad2adb577 100644 (file)
@@ -1,15 +1,24 @@
 ARG_ENABLE("raphf", "for raphf support", "no");
 
 if (PHP_RAPHF == "yes") {
-       var PHP_RAPHF_HEADERS=glob("src/*.h"), PHP_RAPHF_SOURCES=glob("src/*.c");
+       var PHP_RAPHF_HEADERS=glob(configure_module_dirname + "/src/*.h");
+       var PHP_RAPHF_SRC_ARRAY=glob(configure_module_dirname + "/src/*.c");
+       var PHP_RAPHF_SOURCES="";
+       for (var i=0; i<PHP_RAPHF_SRC_ARRAY.length; ++i) {
+               var basename = FSO.GetFileName(PHP_RAPHF_SRC_ARRAY[i]);
+               PHP_RAPHF_SOURCES = PHP_RAPHF_SOURCES + " " + basename;
+       }
 
-       EXTENSION("raphf", PHP_RAPHF_SOURCES);
-       PHP_INSTALL_HEADERS("ext/raphf", "php_propro.h");
+       //EXTENSION("raphf");
+       ADD_SOURCES(configure_module_dirname + "/src", PHP_RAPHF_SOURCES, "raphf");
+       EXTENSION("raphf", "src/php_raphf_api.c");
+       PHP_INSTALL_HEADERS(configure_module_dirname, "php_raphf.h");
        for (var i=0; i<PHP_RAPHF_HEADERS.length; ++i) {
                var basename = FSO.GetFileName(PHP_RAPHF_HEADERS[i]);
-               copy_and_subst(PHP_RAPHF_HEADERS[i], basename, []);
-               PHP_INSTALL_HEADERS("ext/raphf", basename);
+               copy_and_subst("src/" + basename, basename, []);
+               PHP_INSTALL_HEADERS(configure_module_dirname, basename);
        }
+       ADD_FLAG("CFLAGS_RAPHF", "/I" + configure_module_dirname + " ");
 
        AC_DEFINE("HAVE_RAPHF", 1);
 }