Santi Saez wrote:
Jani Taskinen escribió:
Wrong: --disable-shared --enable-static

Might or might not work, no guarantees.

Dear Jani,

Thanks for your reply, I have tried with a very simple:

# ./configure --disable-all --disable-shared --enable-static

But, generated binary uses shared libs ;-(

Yes, that wasn't really the thing. Libtool is nasty but it is possible.
With this small Makefile modification you'll get what you want:

BUILD_CLI = $(LIBTOOL) --mode=link $(CC) -all-static
                                         ^^^^^^^^^^^

Just add the '-all-static' option there after $(CC) and before any other stuff on the line. And same for BUILD_CGI line too if you want that as all static too.

I tested this and it worked, with some nasty notices but those can be ignored. :)

BEWARE: You need ALL the libraries that PHP links to as static libs for this to work!

--Jani



--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to