On Tuesday 05 March 2002 4:36 pm, Lars Gullik Bjønnes wrote:
> +### Check whether the xforms library has a viable image loader
> +### For now, run this test always so config.h is unchanged by a change in
> +### frontend
> +TEMP_LDFLAGS=$LDFLAGS
> +LDFLAGS=$XFORMS_LIB $LDFLAGS
> +
> +lyx_use_xforms_image_loader=no
> +AC_CHECK_FUNCS(flimage_dup,[
> +  AC_CHECK_FUNCS(flimage_to_pixmap,[
> +    lyx_use_xforms_image_loader=yes
> +    AC_CHECK_FUNCS(flimage_enable_ps)])])
> +
> +LDFLAGS=$TEMP_LDFLAGS
> +
> +### If the gui cannot load images itself, then we default to the
> +### very simple one in graphics/GraphicsImageXPM.[Ch]
> +AM_CONDITIONAL(USE_BASIC_IMAGE_LOADER, 
> +   test $lyx_use_xforms_image_loader = no)
> +
> 
> 
> I think this should be split up into one func that is called from
> insede the gui case-switch. (define the func in lyxinclude.m4) 
> 
> and the conditional after the case-switch.
>
> as it it now it is just luck that makes $XFORMS_LIB be defined at all,
> and in the general case xforms will not exist.

Hmmm. Understood. However, I think that this would be a backward step at the 
moment. Why? Because switching frontends would then necessitate a 
re-compilation of the entire lyx tree (because config.h would change).

What would be nice is if there were separate configure scripts for the 
various gui frontends and therefore files frontends/xforms/config.h etc. It 
would fit much more cleanly with the whole concept of separation of lyx from 
its frontend.

At the moment, I can switch frontends by running configure and touching the 
five .C files in frontends. Even this is more work than is really needed. If 
they didn't use a pimpl_ abstraction we could switch frontends simply by 
re-linking. I have sample code for Timeout.C that works perfectly in this 
regard.

So, I would prefer either leaving things as they are or sorting out separate 
configure scripts for the frontends now. Unfortuanately, I'm no expert at 
this sort of thing.

What do you think?

> btw. where is the USE_BASIC_IMAGE_LOADER comming from?

I'm not sure what you mean. It is used in a number of Makefile.ams. See the 
patch.

> Other than this I have no specific comments.

Does this mean I'm getting better? ;-)

Angus

Reply via email to