-dnl Usage LYX_PATH_XFORMS: Checks for xforms library and flags
-AC_DEFUN(LYX_PATH_XFORMS,[
-### Check for xforms library
-AC_CHECK_LIB(forms, fl_initialize, LYX_LIBS="-lforms $LYX_LIBS",
- [AC_CHECK_LIB(xforms, fl_initialize, LYX_LIBS="-lxforms $LYX_LIBS",
- [LYX_LIB_ERROR(libforms or libxforms,xforms)], $LYX_LIBS)], $LYX_LIBS)
-
-### Check for xforms headers
-lyx_cv_forms_h_location="<forms.h>"
-AC_CHECK_HEADER(X11/forms.h,[
- ac_cv_header_forms_h=yes
- lyx_cv_forms_h_location="<X11/forms.h>"],[
-AC_CHECK_HEADER(forms.h,[],[
-LYX_LIB_ERROR(forms.h,forms)])])
-AC_DEFINE_UNQUOTED(FORMS_H_LOCATION,$lyx_cv_forms_h_location)
-if test $ac_cv_header_forms_h = yes; then
- AC_CACHE_CHECK([xforms header version],lyx_cv_xfversion,
- [ cat > conftest.$ac_ext <<EOF
-#line __oline__ "configure"
-#include "confdefs.h"
-
-#include FORMS_H_LOCATION
-#if ! defined(FL_INCLUDE_VERSION)
-"%%%"(unknown)"%%%"
-#else
-"%%%"FL_VERSION.FL_REVISION"%%%"
-#endif
-EOF
-lyx_cv_xfversion=`(eval "$ac_cpp conftest.$ac_ext") 2>&5 | \
- grep '^"%%%"' 2>/dev/null | \
- sed -e 's/^"%%%"\(.*\)"%%%"/\1/' -e 's/ //g'`
-rm -f conftest*])
-case "$lyx_cv_xfversion" in
- "(unknown)"|0.82|0.83|0.84|0.85)
- LYX_ERROR(dnl
-Version $lyx_cv_xfversion of xforms is not compatible with LyX.
- This version of LyX works best with version 0.88[,] although it
- supports also versions 0.81[,] 0.86 and 0.87.) ;;
- 0.81|0.86|0.87)
- LYX_WARNING(dnl
-While LyX is compatible with version $lyx_cv_xfversion of xforms[,]
- it is recommended that you upgrade to version 0.88.) ;;
- 0.88) ;;
- 0.89) LYX_WARNING(dnl
-LyX should work ok with version $lyx_cv_xfversion of xforms[,] but
-it is an unproven version and might still have some bugs. If you
-have problems[,] please use version 0.88 instead.) ;;
- *) LYX_WARNING(dnl
-Version $lyx_cv_xfversion of xforms might not be compatible with LyX[,]
- since it is newer than 0.88. You might have slight problems with it.);;
-esac
-fi])
-
-