[Top][All Lists]

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

Re: Sun compiler and /usr/local/include

From: Charles Brown
Subject: Re: Sun compiler and /usr/local/include
Date: Fri, 05 Mar 2010 16:13:08 -0500
User-agent: Thunderbird (X11/20090817)

Dave Hart wrote:
On Fri, Mar 5, 2010 at 19:25 UTC, Charles Brown wrote:
> Very new to automake, and can't find an answer to this; What would be put in
 > to determine whether the detected preprocessor/compiler
> automatically supplies -I/usr/local/include (for example, g++ does, but sun
 > CC does not), and if not, how to add it to some CFLAGS variable?

To expand on a point Ralf touched on, the typical Autoconf approach is
to predict as little as possible, and test for exactly what you need.
So I would ask you, when your package in built with Sun cc and fails
for lack of -I/usr/local/include, which header file in
/usr/local/include causes the break?  It should be in the compiler's
error message.  And I would suggest you then consider using a test for that specific header file, assuming your code
#includes it, or for the header file your project #includes which
triggers the inclusion of the wrong/missing header.  That test would
then result in the addition of -I/usr/local/include on your Sun cc
configuration.  At the same time, you could easily expand it later if
another system has that header file in a different directory, by
searching a list of directories for the needed .h, rather than simply

Instead of "my project needs -I/foo/include on system bar", I suggest
"my project needs to find the correct foo.h on all systems".

If the file is; /usr/local/include/package/header.h
and source is;  #include <package/header.h>
what goes in

AC_CHECK_HEADER([package/header.h]) just says 'no'.

Apologies for the footer. External mail is thoroughly blocked, and the server adds the footer.

This message is intended only for the addressee and may contain information that is company confidential or privileged. Any technical data in this message may be exported only in accordance with the U.S. International Traffic in Arms Regulations (22 CFR Parts 120-130) or the Export Administration Regulations (15 CFR Parts 730-774). Unauthorized use is strictly prohibited and may be unlawful. If you are not the intended recipient, or the person responsible for delivering to the intended recipient, you should not read, copy, disclose or otherwise use this message. If you have received this email in error, please delete it, and advise the sender immediately. -

reply via email to

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