Re: including autoconf paths in source

2008-12-12 Thread Thomas Dickey
On Thu, 11 Dec 2008, Jan Engelhardt wrote: On Thursday 2008-12-11 21:38, Monty Taylor wrote: 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= ${prefi

Re: including autoconf paths in source

2008-12-12 Thread Ralf Corsepius
On Fri, 2008-12-12 at 06:22 -0500, Thomas Dickey wrote: > On Thu, 11 Dec 2008, Jan Engelhardt wrote: > > > > > On Thursday 2008-12-11 21:38, Monty Taylor wrote: > > > >> Hey all, > >> > >> I'm wondering if there is a best practice for getting paths such as > >> locaeldir or datadir into source cod

Re: including autoconf paths in source

2008-12-12 Thread Thomas Dickey
On Fri, 12 Dec 2008, Ralf Corsepius wrote: compiler, or test-application). Putting them in the generated config.h doesn't run into that problem. Only if done properly. I agree (of course: putting them into the generated config.h is assumed to be "done properly"). For the rest - your example

Re: including autoconf paths in source

2008-12-12 Thread Ralf Corsepius
On Fri, 2008-12-12 at 07:52 -0500, Thomas Dickey wrote: > On Fri, 12 Dec 2008, Ralf Corsepius wrote: > > >> compiler, or test-application). Putting them in the generated config.h > >> doesn't run into that problem. > > Only if done properly. > > I agree (of course: putting them into the generate

Re: including autoconf paths in source

2008-12-12 Thread Thomas Dickey
On Fri, 12 Dec 2008, Ralf Corsepius wrote: automake's toplevel configury applies this trick - It's borrowed from there ;) as you see, this is the autoconf list (and I'm uninterested in reporting bugs in automake - I simply document them and move on). -- Thomas E. Dickey http://invisible-islan

Re: including autoconf paths in source

2008-12-12 Thread John Calcote
Ralf, The trouble with your approach is that it doesn't solve the original poster's issue. The issue was that when such variables are expanded into config.h using the regular AC_DEFINE mechanism, environment variables don't get expanded in the variable substitution: --- snip --- prefix= /usr/loc

Re: including autoconf paths in source

2008-12-12 Thread Ralf Corsepius
On Fri, 2008-12-12 at 10:09 -0700, John Calcote wrote: > Ralf, > > The trouble with your approach is that it doesn't solve the original > poster's issue. The issue was that when such variables are expanded into > config.h using the regular AC_DEFINE mechanism, environment variables > don't get exp