autoconf
[Top][All Lists]
Advanced

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

Re: config variables in config.h


From: Viktor Pavlenko
Subject: Re: config variables in config.h
Date: Thu, 5 Sep 2002 12:17:25 -0400

>>>>> "GD" == Guido Draheim <address@hidden> writes:

    GD> Es schrieb Viktor Pavlenko:
    >> 
    >> Hello,
    >> 
    >> I would like my program to know where it has been installed, in
    >> particular, the location of $datadir. Looks like a natural way
    >> to do it is to have a #define in config.h, like this:
    >> 
    >> /*
    >> * myprog data directory
    >> */
    >> #define MYPROG_DATA_DIR "/usr/local/share/myprog"
    >> 
    >> I tried the following in configure.in:
    >> 
    >> AC_DEFINE_UNQUOTED(MYPROG_DATA_DIR,$datadir,[myprog data directory])
    >> 
    >> but it doesn't work ($prefix/share is inserted and not
    >> expanded). I would appreciate it if someone could tell me how
    >> to do this properly.
    >> 

    GD> http://ac-archive.sf.net/Miscellaneous/ac_define_dir.html

    GD> There are a lot of things that people have done often and
    GD> which have been memorized in the ac-archive. If you make up
    GD> your own ac-macros, just send them to me :-)

Thank you for all the responses. It's just wonderful :)
I chose the Guido's macro (thanks!) but liked other solutions too.

Viktor




reply via email to

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