On Wednesday 14 October 2009 10:46:17 Alberto Luaces wrote: > Alberto Luaces writes: > > Mike Frysinger writes: > >> On Wednesday 14 October 2009 07:37:33 Alberto Luaces wrote: > >>> Is it possible to do what I want? > >>> > >>> 1. If pkgdatadir is not specified at configure time, follow the FHS or > >>> GNU guidelines. > >>> 2. If pkgdatadir is specified, store its value in the configure cache. > >> > >> a lot of people muck around with path vars in configure when they > >> shouldnt. their code tends to be pretty fragile as they have to check > >> multiple vars and expand them manually. > >> > >> what i do is append the CPPFLAGS in the configure.ac like so: > >> CPPFLAGS=$CPPFLAGS' -DMY_DATA_PATH="\"$(pkgdatadir)\""' > > > > This is a great idea, thank you. I also think that the simpler the > > configure.ac, the better. > > Ooops, I read too fast. I thought that you were recommending me to > define MY_DATA_PATH in the configure call: > > configure CPPFLAGS='-DMY_DATA_PATH="\"$(pkgdatadir)\""' > > Luckily it also works, since MY_DATA_PATH is defined twice but the > compiler chooses the last definition, which belongs to the CPPFLAGS > value. It's a great thing for the Autotools that the user configuration > prevails over the developer's :) if you use the line i mentioned in the configure.ac, then you can change the default path via the normal --foodir= configure options, or doing: make clean make pkgdatadir=/foo since the pkgdatadir is expanded at the make level, you dont need to re-run configure. i'm not entirely sure what you're trying to do, but i guess as long as you found something that makes you happy it doesnt matter too much -mike
Attachment:
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf