httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: cvs commit: apache-2.0/src/modules/dav/main config.m4
Date Sat, 01 Jul 2000 21:19:33 GMT
On Sat, Jul 01, 2000 at 08:03:59AM -0700, rbb@covalent.net wrote:
> On Sat, 1 Jul 2000, Greg Stein wrote:
> > On Sat, Jul 01, 2000 at 02:08:25PM -0000, gstein@locus.apache.org wrote:
> > >...
> > >   *) do endian testing, so we can feed it into Expat to optimize that code
> > >...
> > >   +dnl check for endianness
> > >   +if test "$cross_compiling" = "no"; then
> > >   +  AC_C_BIGENDIAN
> > >   +else
> > >   +  AC_DEFINE(AP_UNKNOWN_BYTE_ORDER,1,
> > >   +		[byte order is unknown due to cross-compilation])
> > >   +fi
> > 
> > With the introduction of AC_C_BIGENDIAN, ./buildconf will now issue warnings
> > about a missing cross-compile parameter to AC_TRY_RUN(). This warning can be
> > safely ignored.
> > 
> > Basically, it is there to let you know that AC_C_BIGENDIAN isn't going to
> > work in the cross-compile case. Of course, it doesn't know that we are going
> > to check for that (see above) before calling AC_C_BIGENDIAN which calls
> > AC_TRY_RUN.
> > 
> > We could clone AC_C_BIGENDIAN and write a custom version of this stuff, but
> > that feels a bit bogus (we'd lose future changes/fixes to the macro). The
> > right approach might be to print something in buildconf saying "this warning
> > is safe to ignore".
> 
> AC_TRY_RUN allows you to provide a default for this case.  Just provide
> something intelligent, and the warning should go away.  :-)

The issue is that the AC_TRY_RUN is *inside* the AC_C_BIGENDIAN macro. We
can't insert a test for the third case.

AC_C_BIGENDIAN omits the param on purpose since you can't determine the
target byte order if cross-compiling is occurring. (since AC_TRY_RUN
actually *executes* the code, which is impossible in a cross-compile setup).
By omitting the param on purpose, it ensures that a warning will appear for
the ./configure author to make sure they have covered the situation.

In our case, we check the "cross_compiling" variable before calling into the
AC_C_BIGENDIAN (meaning: the person *running* configure will not have any
problems).

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

Mime
View raw message