[LC++]changing the source depending on a value in the configure script
alainbe at free.fr
Sun Jan 11 01:54:02 UTC 2004
Le sam 10/01/2004 à 16:42, Chris Vine a écrit :
> Autoconf provides a prefix variable for you. Just test the value of $prefix
> (note though that I expect you should really be using the datadir variable,
> also provided by autoconf).
> I have no idea where .qm files go, or what they are, but if you are not using
> automake, you can include something like this in your aclocal.m4 file:
> if test -n "$datadir" && test "$datadir" != "NONE"; then
> and then export it in your Makefile.in file with something like:
> and then pass that as a definition using the g++ -D flag.
> If you are using automake all this is handled for you. You just need
> something like:
> qmdir = $(datadir)/qm
> INCLUDES = -DQMDIR=\"$(qmdir)\"
> in your Makefile.am file. QMDIR will then appear as a standard C preprocessor
> macro definition which you can use in the usual way.
Your explanations are quite like a tutorial.
Thanks a lot,
alain <alainbe at free.fr>
More information about the tuxCPProgramming