On Thu, Jul 25, 2002 at 09:30:28AM -0400, Brian Hechinger wrote:
> On Wed, Jul 24, 2002 at 06:32:46PM -0500, Art Haas wrote:
> > The AC_PROG_CC macro sets the variable GCC to yes if it finds
> > out that the user is compiling with GCC (g++ in our case). After
> > applying this patch, you'll need to regenerate the configure
> > script. What you should see, or more precisely should _not_ see,
> > are the '-Wall -W -pedantic' flags in the resulting makefile
> > if you ar building with the SGI compiler.
> 
> is it possible to check and see which non-gcc compiler we are using?  as
> it is, there is the step to set CXXFLAGS='-LAND:std' in the environment
> before running > configure, i was hoping we could do away with that
> step if at all possible.
> 

The following is a completely untested idea, but the idea seems sound.
You'll need to use the flag that will make the compiler print out its
version info, which I'll call '-v' in my code example below

if test x$GCC = "x"; then
   mips_pro=`cc -v | grep MIPSPro`
   if test x$mips_pro != "x"; then
      CXXFLAGS="${CFLAGS} -LANG:std"
   fi
fi

The 'MIPSPro' in the grep command should be a unique string in the
compiler version printout that is unlikely to appear in another
compiler. As this is just shell scripting, there are additional
types of tests that can be done, such as calling uname to test
the OS type.

-- 
They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety.
 -- Benjamin Franklin, Historical Review of Pennsylvania, 1759

Reply via email to