This could be a long story.
Removing all the current versions and downloading the latest
from mike.qnx.org.ru/qopencd/repository did not work.
Without going into great detail, aclocal and autoconf both burped,
and the configure file was never created properly.
I went back to square one.
I downloaded the following program/versions, mostly from www.gnu.org.
m4 1.4.6
sed 4.1.5
perl 5.8.8
libtool 1.5.22
iconv 1.11
automake 1.9.6
autoconf 2.60
The order in making this is important, but not hard to follow.
If you make a mistake, for example creating autoconf before m4
you get a nice error message telling you to create m4.
All of these except per use the standard procedure:
./configure
make
make install
Perl has it’s own procedure documented in the file INSTALL.
There were a few minor problems compiling. For example, somewhere
in sed I needed the following:
#ifdef QNX
typdef enum { false=0, true=1} bool;
#endif
Those are all the problems I can think of right now.
There is a special note about perl. While the instructions
in the INSTALL file worked, 5 tests out of 200+ failed.
I got cold feet and downloaded 5.8.6 from mike.qnx.org.ru/qopencd/repository.
The test diagnostics suggest that the problem might be minor, and only
a correct env variable might be needed. I’ll check further later, maybe.
Ok, so finally now back to php 5.1.4.
libtoolize -f -c (worked)
aclocal (worked)
autoconf (worked)
./configure … (worked, sort of)
When I first tried make, I immediately got an error when libtools was run.
This turned out to be a strange formation from Makefile
-I"/lib
The problem was an unterminated quote mark.
I removed this weird token from the Makefile, and all started making
properly.
A few source files needed some bandaids, in particular:
php-5.1.4.x/ext/iconv/iconv.c (a few case problems)
ext/mysql/php_mysql.c (needed ushort defined)
ext/posix/posix.c (makedev for QNX 6.3 has 3 args,not 2
insert a zero for first)
main/php_ini.c (problem with missing alphasort)
Then, just when I thought I was finally going to get a valid libphp5.so:
*** Warning: libtool could not satisfy all declared inter-library
*** dependencies of module libphp5. Therefore, libtool will create
*** a static module, that should work as long as the dlopening
*** application is linked with the -dlopen flag.
copying selected object files to avoid basename conflicts…
The same blasted message, and no .so file.
I had only one more thing to try. I uninstalled libtool 1.5.22,
and installed 1.9f from mike.qnx.org.ru. I ran
libtoolize, aclocal, and autoconf again. This time I got the
same errors that stopped me the first time:
autoconf
configure.in:141: warning: AC_PROG_LEX invoked multiple times
…/…/lib/autoconf/programs.m4:755: AC_DECL_YYTEXT is expanded from…
acinclude.m4:2056: PHP_PROG_LEX is expanded from…
configure.in:141: the top level
configure.in:168: error: possibly undefined macro: AC_DEFINE
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.in:198: error: possibly undefined macro: AC_MSG_RESULT
configure.in:1229: error: possibly undefined macro: AC_PROG_LIBTOOL
configure:139824: error: possibly undefined macro: _LT_AC_TRY_DLOPEN_SELF
This brings up a question about the mike.qnx.org.ru/qopencd/respository
version of libtools. It lists its version as 1.9f. The latest version
at www.gnu.org is 1.5.22. Does this mean someone did some special
work on 1.9f for QNX 6? If so, it seems like it is out of date.
I’ve found references at google about these macros, but no answer other
than “broken toolchain”.