[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Protux-devel] getting installation dir from autostuff
From: |
Martin Herren |
Subject: |
Re: [Protux-devel] getting installation dir from autostuff |
Date: |
Sun, 8 Dec 2002 15:34:30 +0100 |
On Fri, 06 Dec 2002 17:58:11 +0000
Luciano Giordana <address@hidden> 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") ?
Hej,
perhaps this is what you want: add this line somewhere at the begining of
src/Makefile.am in protux:
CXXFLAGS = -DPREFIX=\"@address@hidden"
then run again automake in the top directory.
So all the files in src/ will be compiled with
g++ ... -DPREFIX=\"/usr/local\" ...
or whatever you set the prefix variable to when you call ./configure.
Then you can access the variable in the code as any other #define.
There are a lot of other path-variables out there, but i think that @prefix@ is
the right one. AFAIK @bindir@ for example is normally just defined as
@prefix@/bin (if you don't overide it with some strange ./configure options).
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
hope that helps
Martin
PS: Luciano, sorry for CCing you, but my last 2 mails didn't seem to find their
way to the list.
--
Open your Windows - Free your Mind - Enjoy
http://gnuwin.epfl.ch
Martin Herren +41 (0)79 746 57 83
OpenPGP Public key @ http://www.on-the-web.ch/sputnik/gpg.asc
pgpITUnhnuQIZ.pgp
Description: PGP signature