protux-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Protux-devel] getting installation dir from autostuff


From: tapio laxström
Subject: Re: [Protux-devel] getting installation dir from autostuff
Date: Mon, 09 Dec 2002 11:26:39 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2a) Gecko/20020910

Luciano Giordana wrote:
do you have some tip on how to get the installation dir from autostuff from 
withing the code ?
something like, QString p = getenv("INSTALLPATH") ?

I need this to release 0.16.0pre1


Allright, I found the solution (and make changes to protux/libmustux):
1) we need to create acconfig.h file on main level with following:

---clip---
/*Define protux prefix*/
#undef PROTUX_PREFIX
---clip---

2) then we have to add to configure.in (after the default prefix defination, so that there will allways be something)

---clip---
AC_DEFINE_UNQUOTED(PROTUX_PREFIX,${prefix})
---clip---

Now when 'make -f admin/Makefile.common' is executed it automaticly reruns autoheader, which recreates config.h.in-file with PROTUX_PREFIX defination, which is filled up in config.h when ./configure is executed.

simple ;)

Now when PROTUX_PREFIX is needed (and MUSTUX_PREFIX in libmustux), simply add '#include <config.h>' to your source file and there will be define clause with right path.

--
best regards
--
tapio laxström
now playing: Monster Magnet - Powertrip (3:31)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]