autoconf
[Top][All Lists]
Advanced

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

Re: autoconf detecting STL


From: Braden McDaniel
Subject: Re: autoconf detecting STL
Date: Sun, 02 Sep 2007 14:49:35 -0400

On Sun, 2007-09-02 at 18:17 +0530, Hrishikesh Muruk wrote:
> Hi
> 
> I am trying to check if STL is supported by the system and then  
> include the STL headers path in my include path.

The term "STL" has been sufficiently misapplied at this point that it
isn't an adequate descriptor for anything you might wish to check for
using autoconf. Literally, it is the library that Stepanov developed at
HP and later at SGI, which is now still hosted (though no longer
maintained) by SGI. More generically, it might also refer to the STLport
derivative of this library or even to the more nebulously defined
aspects of the C++ standard library that are common to Stepanov's
library.

> I used AC_CXX_HAVE_STL from the macro archive. So now my configure  
> script checks for STL when run. How do I determine the path to the  
> STL headers directory so that I can put it in my -I path (I am using  
> automake + autoconf to bild my project)?
> 
> Please CC me in the reply (I am not subscribed to the list).

Looking at that macro, it does not strike me as generally useful.

If you *really* want to check for the STL or STLport, I suggest you find
some preprocessor symbol that is unique to the headers of one or both of
those libraries.

If, on the other hand, all you care about is a modern C++ standard
library, I think AC_CHECK_HEADERS should be generally adequate. Or, if
you can offer no recourse to make things work in the absence of a modern
standard library, just don't bother to test at all: your build will fail
soon enough, I suspect.

As far as -I flags are concerned, your compiler shouldn't require them
to find its standard library headers. And if you are attempting to use
the STL or STLport at some other location, the user can supply the
requisite -I flags in the CPPFLAGS user variable. If either
AC_CHECK_HEADERS or even AC_CXX_HAVE_STL succeeds, you have the -I flags
you need.

-- 
Braden McDaniel                           e-mail: <address@hidden>
<http://endoframe.com>                    Jabber: <address@hidden>






reply via email to

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