X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/d9088290efb49a352c3c23da25a734ed3e269923..a18baf565e872759de9281c3488c3981d19a15e1:/configure.ac diff --git a/configure.ac b/configure.ac index 2674806cad..aaddfcd738 100644 --- a/configure.ac +++ b/configure.ac @@ -4287,23 +4287,32 @@ else [Returns true if character is any form of separator.]) fi -AH_TEMPLATE(NO_EDITRES, [Define if XEditRes should not be used.]) - -case $opsys in - aix4-2) - dnl Unfortunately without libXmu we cannot support EditRes. - if test "x$ac_cv_search_XmuConvertStandardSelection" = xno; then - AC_DEFINE(NO_EDITRES, 1) - fi - ;; - - hpux*) - dnl Assar Westerlund says this is necessary for - dnl HP-UX 10.20, and that it works for HP-UX 0 as well. - AC_DEFINE(NO_EDITRES, 1) +if test "$USE_X_TOOLKIT" != "none"; then + have_editres=yes + case $opsys in + hpux*) + dnl Assar Westerlund says this is necessary + dnl for HP-UX 10.20, and that it works for HP-UX 0 as well. + have_editres=no ;; -esac - + esac + if test "$have_editres" != no && test ! -z "$LIBXMU"; then + OLDLIBS="$LIBS" + dnl See libXmu.a check above. + if test x$HAVE_X11XTR6 = xyes; then + LIBS="-lXt -lSM -lICE $LIBXMU" + else + OTHERLIBS="-lXt -$LIBXMU" + fi + AC_TRY_LINK( + [#include + #include ], + [_XEditResCheckMessages (0, 0, 0, 0);], + [AC_DEFINE([X_TOOLKIT_EDITRES], 1, + [Define to 1 if we should use XEditRes.])]) + LIBS=$OLDLIBS + fi +fi case $opsys in sol2* | unixware )