On Wed, Jun 07, 2006 at 02:54:35PM -0700, Micah J. Cowan wrote: > On Wed, Jun 07, 2006 at 01:31:43PM -0700, Theodore Sternberg wrote: > > Is there a way to include external files in configure.in? In the > > interest of being modular, of course. > > > > I'm thinking along these lines: > > > > case "${host}" in > > *86*-linux-gnu*) > > include linux.generic > > > > x86_64-*-linux-gnu) > > include linux.generic > > include linux.64 > > > > [...] > > esac > > m4_include([linux.generic]) works for me. > > You should be able to use the GNU m4 manual as a reference, remembering > to prefix all builtins with m4, and checking autoconf's manual for > additional information. Actually, now that I think about it some more, it's probably more efficient to attempt to use the /shell's/ inclusion instead, via the "source" command or somesuch. But then, I have no idea how you would get autoconf to process linux.generic.{ac,in} to linux.generic... you probably can't. Barring that, you should avoid invoking m4_include() more than once on the same file, even "conditionally". NB that simply replacing your includes above with m4_includes will cause the entire contents of linux.generic to be imported into your configure script /twice/. Instead, you might want to set a flag in both linux options, and check for that flag after the case statement, at which point you'd do the /actual/ inclusions. Better yet, I'd imagine you can achieve your goals more efficiently by defining custom macros in your aclocal.m4 (or acinclude.m4, if you're using Automake), and simply invoking the appropriate ones. This really removes any usefulness of sourcing other external files, as far as I can tell. DISCLAIMER: I am /not/ a regular to this list. As far as this forum is concerned, I was literally born yesterday. Additionally, I am not very experienced with either m4 or autoconf (I just know how to get what I want from good reference documentation). Please wait until someone more knowledgeable than myself speaks up, before taking any advice I might offer. -- Micah J. Cowan Programmer, musician, typesetting enthusiast, gamer... http://micah.cowan.name/ _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf