Compiling to relative (movable) directory?
| From: | Benjamin Smith | Date: | Sun, 25 Feb 2007 20:13:25 +0000 |
| Subject: | Compiling to relative (movable) directory? | ||
| Groups: | php.gtk.general | ||
| Request: | Send a blank email to php-gtk-general+get-7708@lists.php.net to get a copy of this message | ||
Is it possible to compile PHP & PHP-GTK to a relative directory, rather than
to an absolute? EG:
./configure --prefix="./";
The reason for this is that I'd like to build a OSX application with all the
required libs contained within the .app directory rather than
in "/usr/local/..." - this seems to be the "OSX Way".
This would make installing a PHP-GTK application a simple drag/drop for OSX.
(after X11 is installed!) With this, however, is the realization that the
actual location of this directory may vary, thus compiling to a static
directory (EG: /usr/local) cannot be assumed.
On my Fedora Core 6 system, I've gotten it to where I can compile/install php
and php-gtk with basically no extensions and have it work, but it bombs on
mcrypt when I move the tree. Here's a script for my latest stab:
#! /bin/sh
cd php-5.2.1/ext/mcrypt/;
./configure \
--with-php-config=../../../bin/php-config \
--with-mcrypt=../../../
make;
cp modules/mcrypt.so ../../../lib/.
But when I run it after moving the main directory, I get
Warning: dl(): Unable to load dynamic library './lib/mcrypt.so' -
libmcrypt.so.4: cannot open shared object file: No such file or directory
in /home/bens/compile/test.phpgtk on line 2
even though the file "mcrypt.so" is found in ./lib! It might be
libmcrypt.so.4, which is also in ./lib, but when libmcrypt was compiled it
was given an absolute path. (it won't accept a relative path, noway, nohow)
Any suggestions/ideas?
-Ben