On Tue, Oct 16, 2001 at 08:06:53AM -0400, [EMAIL PROTECTED] wrote: > > On Tue, 16 Oct 2001, Raja R Harinath wrote: > > > [EMAIL PROTECTED] writes: > > > On Mon, 15 Oct 2001, Gary V. Vaughan wrote: > > >> On Sun, Oct 14, 2001 at 10:03:38PM -0400, [EMAIL PROTECTED] wrote: > > >> > Is there a way to tell libtool that it needs to set some additional > > >> > runtime variables in addition to LD_LIBRARY_PATH when trying to test run > > >> > an executible before its installed? I have some data files and the path > > >> > gets built into the binary, but can be overridden with an environment > > >> > variable. > > >> > > >> You could use a wrapper script that sets the environment up and then execs the > > >> real binary... CVS autoconf does this in the tests dir. > > >> > > >> Or you could set Automake's TESTS_ENVIRONMENT (sp?) variable in your > > >> Makefile.am. > > > > > > This isn't part of the tests target, its more of a `let the user try it > > > before they install it'. Basically, I want the wrapper script setup by > > > libtool to contain an additional variable. > > > > It just happens that the 'autoconf' wrapper scripts are in the 'tests' > > directory. You can use that approach in other places too. > > When I set TESTS_ENVIRONMENT="FOO=bar" in Makefile.am, the only place it > seems to propagate to is in: > > check-TESTS: $(TESTS) > [snip] > if $(TESTS_ENVIRONMENT) $$dir/$$tst; then \ > [snip] > > ie, it never makes it into the libtool wrapper script. Perhaps this has > changed in the developemnet branch of automake?
Nope. It is just the same. I misunderstood your original question. Hari correctly pointed out that the wrapper script approach _will_ work for you (regardless of whether you are using make check). Adding additional vcariables to the existing libtool wrapper scripts might be tough, since libtool only generates a script if the binary is linked with a libtool library. You can certainly add another wrapper script layer of your own in a staging directory (perhaps $top_builddir?) which sets your additional environment up and then execs the binary proper (which may in turn be a libtool wrapper script). HTH, Gary. -- ())_. Gary V. Vaughan gary@(oranda.demon.co.uk|gnu.org) ( '/ Research Scientist http://www.oranda.demon.co.uk ,_())____ / )= GNU Hacker http://www.gnu.org/software/libtool \' `& `(_~)_ Tech' Author http://sources.redhat.com/autobook =`---d__/