Apologies, I now realise what I did wrong - I had unpacked the PHP source files on the PC and didn't realise it was using DOS line feeds. Unpacking on the DS fixed that problem and I can now run configure. The problem I'm having now is the configure script can't find apxs. phpinfo gives me the following results:
'./configure.syno' '--host=armle-unknown-linux' '--target=armle-unknown-linux' '--build=i686-pc-linux' '--with-apxs2=/usr/local/apache/bin/apxs' '--prefix=/usr/syno/php' '--with-config-file-path=/usr/syno/etc' '--with-pgsql=/usr/syno/pgsql' '--with-mysql=/usr/syno/mysql' '--with-mysqli=/usr/syno/mysql/bin/mysql_config' '--with-iconv=/usr/syno/libiconv' '--enable-mbstring' '--with-gd' '--enable-gd-native-ttf' '--with-zlib-dir=/usr/local/arm-marvell-linux-gnu' '--with-png-dir=/usr/local/arm-marvell-linux-gnu' '--with-jpeg-dir=/usr/local/arm-marvell-linux-gnu' '--enable-exif' '--with-imap=../imap-2007e' '--enable-calendar' '--enable-ftp' '--enable-sockets' '--with-libexpat-dir=/usr/syno' '--enable-dom' '--with-libxml-dir=/source/libxml2-2.6.32' '--enable-simplexml' '--enable-libxml' '--enable-xmlreader' '--enable-xmlwriter' '--disable-ipv6' '--disable-pdo' '--without-pdo-sqlite' '--without-sqlite' '--with-curl=/usr/syno' '--disable-cgi' '--enable-bcmath' '--with-gettext'
And right enough /usr/local/apache/bin/apxs does not exist. I suspect this is because the diskstation has a minimum Apache installation and apxs ships with the server distribution. All of this is guesswork on my part, though, and I really don't want to trash my web server. Can anyone point me in the right direction with this? Do I need to replace Apache before I can proceed with this?
I also realise this post is probably in the wrong forum and should probably be in the Apache forum.