Help with first project.



Hi folks,

I'm on a tip quest. Just a really easy one though I'm sure.

I've just converted my project to gnome. I have also set up autoconf,
automake, and cvs autogen.sh type stuff.

This all works really nicely (don't know how people cope without it),
"make dist" is sooo useful, and "make distcheck" saves me so much time!

However, having setup all the datadir and other variables for the
configure and install process, how do I get these variables into my
code?

For example, I wish to know where $datadir is at run-time. I need to
access a directory in $prefix/share/ at runtime, but I don't wish to
hardcode what prefix is....

I think this has something to do with config.h? I create on using 
AM_CONFIG_HEADER(config.h), but how do I get autoconf to stick
variables such as PREFIX, DATADIR in there?

Is that even the correct method?

Feel free to tell me to rtfm, I've been doing it all day, another few
hours won't kill me I guess ;)

Tom.
-- 
            .-------------------------------------------------------.
    .^.     | Tom Gilbert, England | tom@tomgilbert.freeserve.co.uk |
    /V\     |----------------------| www.tomgilbert.freeserve.co.uk |
   // \\    | Sites I recommend:   `--------------------------------|
  /(   )\   | www.freshmeat.net www.enlightenment.org www.gnome.org |
   ^^-^^    `-------------------------------------------------------'



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