---------- Forwarded message ---------- From: Praveen kumar R <praveenrgowda@xxxxxxxxx> Date: Tue, Jun 24, 2014 at 9:49 PM Subject: Re: How to include macro headers To: Eric Blake <eblake@xxxxxxxxxx> I apologize for my poor description of the issue. To start of with I have a file platform.inc, which includes the build time macro definitions, B_REFSW_OS = linuxuser NEXUS_PLATFORM = 97428 NEXUS_MODE = BCHP_CHIP = 7429 BCHP_VER = B0 which are used in my source file to make switches,see below code snippet if (NEXUS_PLATFORM == 97428) { { } else { } I am trying to include this inc file in the automake file so that the build variables are available for the sources at the compile time. This is an existing inc file which is used in the normal makefile, as I am porting this component to autotools I needed to do the same. I tried this in my Makefile,am include platform.inc this is not working and I am getting compile time errors, like NEXUS_PLATFORM undefined, because there is check in the source before using it like ifndef NEXUS_PLATFORM: ERROR can I use the existing inc file as is ? or do I need to port this as to suit for autotools environment. Thanks, Praveen R On Tue, Jun 24, 2014 at 8:48 PM, Eric Blake <eblake@xxxxxxxxxx> wrote: > On 06/24/2014 07:06 AM, Praveen kumar R wrote: > > Hi All, > > I have a generic inc file where all the build macros are present. > > These macros are used in the source c files to make switches, how can I > > include this inc file in autoconf. > > I tried using "include" directive in my am file and it does not have any > > effect. > > Thanks for the report. However, it is lacking on enough details for me > to even figure out what you are asking (are you trying to write an .m4 > file to be included at autoconf time, a .h to be included at make time, > or a macro that gets included into the config.h that is incrementally > built up during configure to affect later configure tests?). Can you > post an actual minimal code sample of what you have tried, with more > details of what you are hoping to accomplish, rather than just vague > descriptions? > > -- > Eric Blake eblake redhat com +1-919-301-3266 > Libvirt virtualization library http://libvirt.org > > _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx https://lists.gnu.org/mailman/listinfo/autoconf