Re: shared extension linking

From: Date: Mon, 19 Aug 2002 14:52:24 +0000
Subject: Re: shared extension linking
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-87078@lists.php.net to get a copy of this message
Hi David, David Eriksson wrote: > Use PHP_ADD_LIBRARY_WITH_PATH or PHP_ADD_LIBRARY in your config.m4 > Already done... My config.m4: Note: IndiComm, ndr and mmem have to be statically linked into this module! ------------------------------------------------------ INDI_PROJECT_PATH="/home/ron/INDI" PHP_ARG_ENABLE(indi, whether to enable indi support, [ --enable-indi Enable indi support]) if test "$PHP_INDI" != "no"; then AC_ADD_INCLUDE($INDI_PROJECT_PATH/include) AC_ADD_INCLUDE($INDI_PROJECT_PATH/GUI/include) AC_ADD_INCLUDE($INDI_PROJECT_PATH/NDR/include) AC_ADD_INCLUDE($INDI_PROJECT_PATH/include/dacs) PHP_ADD_LIBRARY_WITH_PATH(IndiComm,$INDI_PROJECT_PATH/lib) PHP_ADD_LIBRARY_WITH_PATH(ndr,$INDI_PROJECT_PATH/lib) PHP_ADD_LIBRARY_WITH_PATH(mmem,$INDI_PROJECT_PATH/lib) PHP_EXTENSION(indi, $ext_shared) fi ------------------------------------------------------ My Makefile.in: ------------------------------------------------------ # $Id$ LTLIBRARY_SOURCES = indi.c LTLIBRARY_SHARED_NAME = indi.la include $(top_srcdir)/build/dynlib.mk ------------------------------------------------------ Now the steps I walked throug according to README.SELF-CONTAINED-EXTENSIONS: First I modified config.m4 and Makefile.in. Then I run phpize in this dir. After running ./configure the prefix in config_vars.mk isn't set right. I modify each wrong path... Now I make: The additional libs don't occour in the make output...hmmm After that I just insert '-L/home/ron/INDI/lib -lIndiComm -lmmem -lndr' into the INCLUDES var in config_vars.mk. After the following make the libs occour in the output. Fine...but if the module is dl()ed in a script, php complains about missing shared objects... Regards Ron

« previous php.dev (#87078) next »