# Configuring SPL as SHARED

- Thread: https://externals.io/message/7201
- Original archive: https://news-web.php.net/php.internals/7201
- Started by Blake Schwendiman on 2004-01-20T16:45:07+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

---

## #7201 — Blake Schwendiman — 2004-01-20T16:45:07+00:00

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

The config.m4 file that is currently shipping (php5-200401192230)
disallows configuring SPL as a shared module on non-Windows as shown
immediately below.  However, no such restriction is given for the
Windows configure (config.w32) shown further on.  Having built the
shared version for Windows, it also appears to work just fine.  Can
someone enlighten me as to whether SPL can/should be built as a shared
PHP module?
 
Thanks, 
Blake Schwendiman
 
----- config.m4 -----
 
dnl $Id: config.m4,v 1.9 2004/01/19 11:07:19 chregu Exp $
dnl config.m4 for extension SPL
 
PHP_ARG_ENABLE(spl, enable SPL suppport,
[  --disable-spl           Disable Standard PHP Library], yes)
 
if test "$PHP_SPL" != "no"; then
            if test "$ext_shared" = "yes"; then
                        AC_MSG_ERROR(Cannot build SPL as a shared
module)
            fi
    AC_DEFINE(HAVE_SPL, 1, [Whether you want SPL (Standard PHP Library)
support]) 
    PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c
spl_iterators.c spl_array.c spl_directory.c spl_sxe.c, $ext_shared)
fi
 
----- config.w32 -----
 
// $Id: config.w32,v 1.3 2004/01/19 08:31:16 sebastian Exp $
// vim:ft=javascript
 
ARG_ENABLE("spl", "SPL (Standard PHP Library) support", "no");
 
if (PHP_SPL != "no") {
            EXTENSION("spl", "php_spl.c spl_functions.c spl_engine.c
spl_iterators.c spl_array.c spl_directory.c spl_sxe.c");
            AC_DEFINE('HAVE_SPL', 1);
}
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Blake Schwendiman
PHP Development Books: http://www.lulu.com/intechrabooks

---

## #7202 — Marcus Boerger — 2004-01-20T19:35:57+00:00

URL: https://externals.io/message/7201#7202 · In reply to: #7201

Hello Blake,

Tuesday, January 20, 2004, 5:45:07 PM, you wrote:

> The config.m4 file that is currently shipping (php5-200401192230)
> disallows configuring SPL as a shared module on non-Windows as shown
> immediately below.  However, no such restriction is given for the
> Windows configure (config.w32) shown further on.  Having built the
> shared version for Windows, it also appears to work just fine.  Can
> someone enlighten me as to whether SPL can/should be built as a shared
> PHP module?
 
The only reason it is currently possible to build SPL as shared extension
under windows is that i haven't yet the time to do the change. The problem
is that other modules will rely on SPL's classes and the current
infrastructure doesn't allow us enforece the requirements yet.


Best regards,
 Marcus                            mailto:helly@php.net
