I'm finally trying to tackle an improvement in the config.m4 for my tuxedo module.
Previously, I've just hacked my way from other config.m4 scripts until it did what I
wanted. But now I need it to get fancy.
The problem comes because the raw Tuxedo libraries and the linking required
to use them seems to vary with each Tux version. However, they provide
a utility they expect people to use to link a client program (buildclient) which
has a verbose option that prints the details of its compile/link command.
(I can't just use it solely because it assumes its to build a executable program,
not a dynamic library).
So if I can get the config.m4 script to execute a sequence like:
buildclient -v -w -f simple_sample.c
The first line it outputs would look like:
cc -I $TUXDIR/include -o a.out -L{$TUXDIR}/lib simple_sample.c -lwsc -lbuft -lwsc
-lgpnet -lfml -lfml32 -lengine -ldl -lpthread /usr/lib/libcrypt.a
(plus some other lines)...
But this output will vary with at least 2 or 3 different versions of Tuxedo, hence
I can't just hardcode the m4 file.
I need to capture all the -l lines, and take those to create my
PHP_ADD_LIBRARY and TUXEDO_LIBS lines for the config.m4.
This is how, given the Tuxedo version provided, I should link a program.
>From there, the rest of the buldconf process will take over just fine.
My experience with m4, very little. My knowledge of exactly what those m4 macros
like PHP_ADD_LIBRARY do ... very little also.
Does anyone have any ideas or places I can start to work this out?
Much appreciated.
Brian
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php