| On Wed, 12 Jul 2000, Peter Eisentraut wrote:
| > Alexandre Oliva writes:
| > 
| > > > What about systems that don't have a `cc' but only a `gcc' or whatever
| > > > else?
| > > 
| > > The user would have to set CC_FOR_BUILD.  But see below:
| > > 
| > > >> In the future, it may be extended to look for gcc if it can't find
| > > >> cc.
| > 
| > But that would break things for a lot of people right now. Instead of
| > writing `CC=/opt/bin/gcc ./configure', they'd have to write
| > `CC=/opt/bin/gcc CC_FOR_BUILD=/opt/bin/gcc ./configure'?
| 
| 
| Why should anyone need to set env vars by hand? Here
| is a quick hack from a configure.in script that I
| created. What do folks think of this approach?
| 
| dnl     Have the system search for and test out the C compiler
| AC_PROG_CC
| 
| dnl     This is a hack to work around a bug in autoconf/libtool
| dnl     We need to export CC and CC_FOR_BUILD so that libtool
| dnl     uses the compiler found by ./configure and we can cross.
| 
| export CC
| if test "x$cross_compiling" = "xyes" ; then
|   AC_CHECK_PROG(CC_FOR_BUILD, gcc, gcc, cc)
|   export CC_FOR_BUILD
| fi

Seems a fine hack to me, but the fact that you still use `dnl' :)

Reply via email to