|
From: | Martin Herren |
Subject: | Re: [Protux-devel] getting installation dir from autostuff |
Date: | Mon, 09 Dec 2002 12:37:43 +0100 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 |
Luciano Giordana wrote:
---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.Seems good, I will try that too
yeah, i think Tapio's solution is better (cleaner). For the compiler both result are exactly the same, in my solution the #define is given as a compiler option, in Tapio's through an #include file. But for an include-path, i still think an #include is cleaner, so i would stick with Tapio's solutions.
/Martin PS: by the way, the mailing list seems to work again correctly...
[Prev in Thread] | Current Thread | [Next in Thread] |