Re: datadir variable



Luka Napotnik wrote:
Hello!

When I didn't use autoconf, I loaded images with an absolute path. But
now I use autoconf and if I do make install, the path is wrong. Now I
figured out that I need to get the right path with a $datadir variable
which is in Makefile.in. How do I get that variable into my C program?

greets,
Luka Napotnik

just add some lines to your Makefile.am like these:
INCLUDES = \
        -I srcdir@ \
        -DLOCALEDIR=\"$(localedir)\" \
        -DLIBDIR=\"$(libdir)\" \
        -DDATADIR=\"$(datadir)/buzztard\"

These make defines named LOCALEDIR, LIBDIR, DATADIR available to your source.

Stefan



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