[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to add directory to CFLAGS (or CXXFLAGS) search path?

From: Patrick Doyle
Subject: Re: How to add directory to CFLAGS (or CXXFLAGS) search path?
Date: Mon, 10 Nov 2014 13:17:17 -0500

Hi Mike,
Thanks for the tip.  I received some help this morning on IRC and
settled on something vaguely like:

dnl Search for legacy code trunk directory, allow --with-legacy=/path/to/branch
     [specify path to legacy source branch @<:@default=../../../trunk@:>@])],
     [AC_MSG_ERROR([unable to find $legacy_shared_include])])

Note, I chose LEGACY_CFLAGS over LEGACY_CPPFLAGS in order to mimic the
behavior of PKG_CHECK_MODULES.  That way, the for my new
application looks like:

bin_PROGRAMS = new

new_SOURCES  =  new.cpp

I could/should still add some code to to handle the case
where the end user specifies --with-legacy or --without-legacy
(instead of --with-legacy=/path/to/branch), but since only 5 of us
will ever use this code, and we're all within mumbling distance of
each other, I decided to punt.

This is more or less what I where I was heading when I first asked my
question... thanks very much to help from <berndj> and <va>  on IRC.
But I wanted to ask first if there was an existing macro or method for
doing this.  (I think I also had some whacked out idea about magic
code that would traverse the file system back up the tree from where
my code base was installed until it found
common/include/legacy_include.h, but I decided that would offer far
less usefulness than the trouble of writing it would cost).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]