LDFLAGS
Daniel Morissette
danmo at videotron.ca
Wed Sep 13 17:36:52 PDT 2000
Sean O'Hagan wrote:
>
> Hello:
>
> Could someone point me in the right direction to find out what LDFLAGS does?
> The best I can determine sofar is that it passes flags to lex(1). However,
> I've also read that the LDFLAGS macro can be redefined.
>
> While compiling mapscript 3.3.011 with PHP3 we got a message saying that to
> enable PHP extensions we have to add -Wl to the LDFLAGS line of the
> makefile.
>
This warning message applies to you only if you are using PHP as a CGI
(not as an Apache module) but you may get it all the time. It usually
gives you a flag to add to the PHP CGI link command to allow the use of
shared libraries in your PHP executable.
It comes from a test that I borrowed from a compilation script that came
with php-3.0.14 for dl() modules, so my explanation is based on my
understanding of it and I may not be 100% right.
On a Linux system, for instance, it tells you that you need to add
"-rdynamic" to the LDFLAGS in the main PHP makefile and then recompile
your PHP CGI executable. If you tried to use PHP as a CGI with a PHP
executable not compiled with "-rdynamic" then you would get errors when
you call 'dl("php_mapscript.so");' because your executable is not able
to support loading of shared libraries.
I've been told that on *BSD systems, the value to add to LDFLAGS is
"-export-dynamic" ... I don't know about the other OS's, but "-Wl" does
not seem to make much sense.
I hope that helps,
--
------------------------------------------------------------
Daniel Morissette danmo at videotron.ca
http://pages.infinit.net/danmo/
------------------------------------------------------------
Don't put for tomorrow what you can do today, because if
you enjoy it today you can do it again tomorrow.
More information about the MapServer-users
mailing list