![]() |
Blitz Devel : |
From: Julian Cummings (cummings_at_[hidden])
Date: 2004-05-04 12:58:33
Hello Frank,
Thank you for your comments. This autoconf/automake stuff is so hairy!
Frank Schimmel wrote:
>While we're at it: you shouldn't mess with the AM_CXXFLAGS anyway.
>Or any of the AM_ variables. If you do so, some standard things stop
>working that some people might (rightly) expect to. (E.g. defining
>preprocessor symbols by `make DEFS=-Dfoo=42 target'.)
>
>If you want to add include directories use INCLUDES. Adding a
>`-I$(top_srcdir)' here should let globals.cpp find the headers.
>[There is no need to worry about the current build dir and the
>corresponding source dir, $(srcdir). DEFAULT_INCLUDES takes care of
>that. It is set automatically by automake to something like
>`-I. -I$(srcdir)' and an -I for every directory containing a config
>heder file. (None in the case of blitz.)]
>
We were using the INCLUDES variable before, but I noticed that in the
automake
online manual (see Variables used when building a program
<http://www.gnu.org/software/automake/manual/html_node/Program-variables.html#Program%20variables>),
it says that INCLUDES
is now deprecated and one should use AM_CPPFLAGS for this purpose.
Actually,
looking again now at the changes I made, I think I accidentally put
these -I flags in
AM_CXXFLAGS instead. I will go back and move these flags to AM_CPPFLAGS.
Also, I have disabled the use of DEFAULT_INCLUDES by putting the option
nostdinc
into the AM_INIT_AUTOMAKE call. I did this to prevent automake from
adding a
-I../blitz to the compile line when building things like the testsuite
codes. This include
flag was being added because we are using the AC_CONFIG_HEADERS macro with
the argument blitz/config.h to indicate the location of our config
header file. So automake
wants to add a -I flag pointing into the blitz subdirectory, which is
nice except that we
follow the convention of including blitz header files as blitz/foo.h
already. I needed to
eliminate this unnecessary -I flag because it actually caused
compilation problems on the
Compaq platform, so I used the nostdinc option and then added back the
-I$(srcdir). Ugh!
I don't believe that I need to explicitly add a -I. flag because
normally $(srcdir) is equal to '.'
and when it isn't, adding -I. will likely not help you.
I hope this all makes some sense.
Regards, Julian C.
-- Dr. Julian C. Cummings E-mail: cummings_at_[hidden] California Institute of Technology Phone: 626-395-2543 1200 E. California Blvd., Mail Code 158-79 Fax: 626-584-5917 Pasadena, CA 91125