I have added this line to my config.m4
file and it appears to have fixed it:
EXTRA_LDFLAGS=multi.o
So now the whole file looks like this:
PHP_ARG_ENABLE(framework, whether to enable framework support,
[ --enable-framework Enable Framework support])
if test "$PHP_FRAMEWORK" = "yes"; then
AC_DEFINE(HAVE_FRAMEWORK, 1, [Whether you have Framework])
PHP_NEW_EXTENSION(framework, framework.c, $ext_shared)
EXTRA_LDFLAGS=multi.o
fi
Which generates the Makefile
that has the line EXTRA_LDFLAGS = multi.o
on line 36. This then pulls in the source I need and works correctly.
Not sure if this is the best / right way of doing it, but it works.