[PATCH] add missing AC_CACHE_CHECKs to glib2's configure.in



We'd like to have the following patch (well, two patches)
applied to the main glib sources.  I'm willing to send beer
if it'd help :-)
The patch is entered into the gnome bug tracking system
( http://bugzilla.gnome.org/show_bug.cgi?id=77565 )
but it seemed like a good idea to air it here, too.

Comments welcome.
Thanks,
Dan Kegel

---------------------------------------------------------

Here's a pair of patches that fix glib2 so it can be
cross-compiled.  All they change are configure.in
and acglib.m4.

A little background: We need to cross-compile glib2 to run
on an embedded system.  When cross-compiling, the standard
way to get configure to work is to override any AC_TRY_RUNs
by pre-setting their results in the environment.

Most of the AC_TRY_RUNs in glib2's configure.in can
be overridden from the environment, but a few can't,
because they aren't wrapped with AC_CACHE_CHECK, which
automatically checks for the appropriate environment
variables.

One AC_TRY_RUN that can't be fixed this way is the one in
GLIB_SYSDEFS in acglib.m4, which naughtily uses AC_TRY_RUN
for its side-effects.

The first patch,
http://bugzilla.gnome.org/showattachment.cgi?attach_id=7539
adds the missing AC_CACHE_CHECKS, and
adds a more or less correct fallback for GLIB_SYSDEFS in
the cross-compile case.  To make it easier to verify by
eye, the first patch doesn't reindent the affected areas.

The second patch,
http://bugzilla.gnome.org/showattachment.cgi?attach_id=7540
just reindents.

We verified that this works on an sh4 processor
cross-compiled from an intel machine.  All regression tests
pass except for the pattern test, but fixing that can wait
for another day; these patches at least get glib2 to the
point where you can try to use it on embedded systems.

--------------------------------------------------------------



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