diff --git a/config/ChangeLog b/config/ChangeLog index cf7cea3898..61dc19f1ef 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,13 @@ +2002-08-16 Jean-Marc Lasgouttes + + * lyxinclude.m4 (LYX_PATH_XPM): do not pass XPM_LIB as 5th + argument of AC_CHECK_LIB + + * xforms.m4 (LYX_PATH_XFORMS): use 5th argument of AC_CHECK_LIB to + make sure that -lXpm is used when linking. Require LYX_PATH_XPM. + (LYX_USE_XFORMS_IMAGE_LOADER): use XPM_LIB here + + 2002-08-14 John Levon * configure.in: diff --git a/config/lyxinclude.m4 b/config/lyxinclude.m4 index 18bea24f02..2da7eede20 100644 --- a/config/lyxinclude.m4 +++ b/config/lyxinclude.m4 @@ -502,8 +502,8 @@ AC_DEFUN(LYX_CXX_GLOBAL_CSTD,[ dnl Usage LYX_PATH_XPM: Checks for xpm library and header AC_DEFUN(LYX_PATH_XPM,[ ### Check for Xpm library -AC_CHECK_LIB(Xpm, XpmCreateBufferFromImage,XPM_LIB="-lXpm", - [LYX_LIB_ERROR(libXpm,Xpm)], $XPM_LIB) +AC_CHECK_LIB(Xpm, XpmCreateBufferFromImage, XPM_LIB="-lXpm", + [LYX_LIB_ERROR(libXpm,Xpm)]) AC_SUBST(XPM_LIB) ### Check for Xpm headers lyx_cv_xpm_h_location="" diff --git a/config/xforms.m4 b/config/xforms.m4 index 2e7830e9f6..bbfc6c7d0c 100644 --- a/config/xforms.m4 +++ b/config/xforms.m4 @@ -4,12 +4,11 @@ dnl Usage LYX_PATH_XFORMS: Checks for xforms library and flags dnl If it is found, the variable XFORMS_LIB is set to the relevant -l flags, dnl and FORMS_H_LOCATION / FLIMAGE_H_LOCATION is also set AC_DEFUN(LYX_PATH_XFORMS,[ - -LIBS="$XPM_LIB $LIBS" +AC_REQUIRE([LYX_PATH_XPM]) AC_CHECK_LIB(forms, fl_initialize, XFORMS_LIB="-lforms", [AC_CHECK_LIB(xforms, fl_initialize, XFORMS_LIB="-lxforms", - [LYX_LIB_ERROR(libforms or libxforms,xforms)])]) + [LYX_LIB_ERROR(libforms or libxforms,xforms)], $XPM_LIB)], $XPM_LIB) AC_SUBST(XFORMS_LIB) ### Check for xforms headers @@ -65,9 +64,9 @@ fi dnl Check whether the xforms library has a viable image loader AC_DEFUN(LYX_USE_XFORMS_IMAGE_LOADER, -[ +[AC_REQUIRE([LYX_PATH_XFORMS]) save_LIBS=$LIBS -LIBS="$XFORMS_LIB $LIBS" +LIBS="$XFORMS_LIB $XPM_LIB $LIBS" lyx_use_xforms_image_loader=no AC_LANG_SAVE AC_LANG_C @@ -79,7 +78,7 @@ AC_SEARCH_LIBS(flimage_dup, flimage, [lyx_use_xforms_image_loader=yes if test "$ac_cv_search_flimage_dup" != "none required" ; then XFORMS_IMAGE_LIB="-lflimage $XFORMS_IMAGE_LIB" - LIBS="$XFORMS_IMAGE_LIB $XFORMS_LIB $LIBS" + LIBS="$XFORMS_IMAGE_LIB $LIBS" fi]) AC_SUBST(XFORMS_IMAGE_LIB)