Jean-Marc and other m4 wizards, I have been trying to make sense of the configure magic stuff. Black magic more like. Yuch.
Am I right to say that the entire test should be wrapped up so: dnl Check whether to use the the image loading facilities of the gui library. AC_DEFUN(LYX_USE_GUI_IMAGE_LOADER, [AC_MSG_CHECKING([whether to use the the gui library to load images]) ... done]) This declares the test. How do I invoke it? Moving on... Are we meant to use LYX_CHECK_DECL? I see that it is defined, but noone else seems to use it. What does it return? "yes"/"no"? Do these macros "return" anything or have I got the wrong end of the stick. I was imagining a test like: if test $lyx_use_frontend = "xforms" -a LYX_CHECK_DECL(flimage_dup, FORMS_H_LOCATION) = "yes" -a LYX_CHECK_DECL(flimage_to_pixmap, FORMS_H_LOCATION) = "yes" then lyx_use_gui_image_loader=yes else lyx_use_gui_image_loader=no fi if test $lyx_use_gui_image_loader = yes; then AC_DEFINE(USE_GUI_IMAGE_LOADER, 1, [Define to use the image loading facilities of the gui library.]) AC_DEFINE(HAVE_FLIMAGE_ENABLE_PS, LYX_CHECK_DECL(flimage_enable_ps, FORMS_H_LOCATION) = yes, [Define if you have flimage_enable_ps in forms.h]) fi AM_CONDITIONAL(USE_GUI_IMAGE_LOADER, test $lyx_use_gui_image_loader = yes) But I have to admit I am hating every second of this and am quite lost! Angus ps why do you keep shoving an "x" on both sides of a conditional if test x$some_test = xyes; then ... A