On Wed, May 03, 2000 at 12:48:30AM -0500, Albert Chin-A-Young wrote:
> On Wed, May 03, 2000 at 02:36:52AM -0300, Alexandre Oliva wrote:
> > On May  3, 2000, Albert Chin-A-Young <[EMAIL PROTECTED]> wrote:
> > 
> > > Ok, thanks. However, this raises another problem.
> > > CXXFLAGS="-Wc,-LANG:std" won't work as the configure tests to make
> > > sure CC works will fail.
> > 
> > You'd have to add this flag to LDFLAGS (since it's only to be used at
> > link time; at compile-time, -LANG:std is supposed to work), and only
> > just before outputting the Makefiles in configure.in.
> 
> Ick. Would the best solution be an autoconf test, --with-sgi-std-c++,
> that does all this? It would add -LANG:std to LDFLAGS at the correct
> time and make sure libtool got -Wc,-LANG:std. Or, should we just
> automatically test if the C++ compiler supports -LANG:std and do the
> right thing? I kinda like this last solution better.

I've thought about this some more and would prefer to see libtool
understand -LANG:std. In practice, people are already patching their
local copy of libtool to handle this. The following is how libtool
will perform a compile:
  LTCXXCOMPILE = $(LIBTOOL) --mode=compile $(CXX) $(DEFS) $(INCLUDES)
  $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)

So, if -Wc,-LANG:std is the solution, then we have to replace
-LANG:std in CXXFLAGS with -Wc,-LANG:std and hope the program uses
libtool only for compiles. In a way, this reminds me of Paul Eggert's
AC_SYS_LARGEFILE macro. If a program wants largefile support, *every*
program has to add the autoconf macro. It doesn't just *come* with
autoconf. Ditto for libtool and IRIX C++. If C++ programs want libtool
support, they must now add this new autoconf test to modify CXXFLAGS for
libtool. If libtool understood -LANG:std, one less thing for the authors
to deal with.

-- 
albert chin ([EMAIL PROTECTED])

Reply via email to