Hey all,

I'm wondering if there is a best practice for getting paths such as
locaeldir or datadir into source code. As it stands now in the Makefile
I've got:

prefix= /usr/local
datarootdir= ${prefix}/share
localedir = ${datarootdir}/locale

To get localedir into a source file, I've got a section in Makefile.am like:

DEFS = -DLOCALEDIR="\"$(localedir)\"" @DEFS@

(except that I've actually got several - localedir is just a convenient
example) It makes things a little ugly.

If I just do AC_DEFINE(LOCALEDIR,"${localedir}") I only get
#define LOCALEDIR "${datarootdir}/locale"

is there a cantrip I'm missing, or a decent way to deal with this?

Thanks!


Reply via email to