# HG changeset patch # User Chong Yidong # Date 1181755934 0 # Node ID ed0e578fd01a5905edadcb6f7101318ffa375779 # Parent da68077b1328271b34a4dff8fabbbeefda26416c Merge xaw3d and libXaw checks. Check xaw3d even when compiling without scrollbars. diff -r da68077b1328 -r ed0e578fd01a configure.in --- a/configure.in Wed Jun 13 17:31:45 2007 +0000 +++ b/configure.in Wed Jun 13 17:32:14 2007 +0000 @@ -1874,7 +1874,6 @@ case "${with_x_toolkit}" in athena | lucid ) USE_X_TOOLKIT=LUCID ;; motif ) USE_X_TOOLKIT=MOTIF ;; -dnl open-look ) USE_X_TOOLKIT=OPEN_LOOK ;; gtk ) with_gtk=yes dnl Dont set this for GTK. A lot of tests below assumes Xt when dnl USE_X_TOOLKIT is set. @@ -2241,29 +2240,45 @@ dnl Do not put whitespace before the #include statements below. dnl Older compilers (eg sunos4 cc) choke on it. +HAVE_XAW3D=no if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then - if test x"${HAVE_X11R5}" = xyes; then - AC_MSG_CHECKING(X11 version 5 with Xaw) - AC_CACHE_VAL(emacs_cv_x11_version_5_with_xaw, + if test x"${HAVE_X11R5}" != xyes; then + USE_X_TOOLKIT=none + else + AC_MSG_CHECKING(for xaw3d) + AC_CACHE_VAL(emacs_cv_xaw3d, [AC_TRY_LINK([ #include +#include ], + [], + emacs_cv_xaw3d=yes, + emacs_cv_xaw3d=no)]) + if test $emacs_cv_xaw3d = yes; then + AC_MSG_RESULT([yes; using Lucid toolkit]) + USE_X_TOOLKIT=LUCID + HAVE_XAW3D=yes + AC_DEFINE(HAVE_XAW3D, 1, + [Define to 1 if you have the Xaw3d library (-lXaw3d).]) + else + AC_MSG_RESULT(no) + AC_MSG_CHECKING(for libXaw) + AC_CACHE_VAL(emacs_cv_xaw, + [AC_TRY_LINK([ +#include #include ], - [], - emacs_cv_x11_version_5_with_xaw=yes, - emacs_cv_x11_version_5_with_xaw=no)]) - if test $emacs_cv_x11_version_5_with_xaw = yes; then - AC_MSG_RESULT([5 or newer, with Xaw; use toolkit by default]) - USE_X_TOOLKIT=LUCID - else - if test x"${USE_X_TOOLKIT}" = xLUCID; then + [], + emacs_cv_xaw=yes, + emacs_cv_xaw=no)]) + if test $emacs_cv_xaw = yes; then + AC_MSG_RESULT([yes; using Lucid toolkit]) + USE_X_TOOLKIT=LUCID + elif test x"${USE_X_TOOLKIT}" = xLUCID; then AC_MSG_ERROR([Lucid toolkit requires X11/Xaw include files]) else - AC_MSG_RESULT(before 5 or no Xaw; do not use toolkit by default) + AC_MSG_RESULT([no; do not use toolkit by default]) USE_X_TOOLKIT=none fi fi - else - USE_X_TOOLKIT=none fi fi @@ -2351,21 +2366,6 @@ fi fi -### Is -lXaw3d available? -HAVE_XAW3D=no -if test "${HAVE_X11}" = "yes"; then - if test "${USE_X_TOOLKIT}" != "none" && test "${with_toolkit_scroll_bars}" != "no"; then - dnl Fixme: determine what Scrollbar.h needs to avoid compilation - dnl errors from the test without the `-'. - AC_CHECK_HEADER(X11/Xaw3d/Scrollbar.h, - [AC_CHECK_LIB(Xaw3d, XawScrollbarSetThumb, HAVE_XAW3D=yes)], , -) - if test "${HAVE_XAW3D}" = "yes"; then - AC_DEFINE(HAVE_XAW3D, 1, - [Define to 1 if you have the Xaw3d library (-lXaw3d).]) - fi - fi -fi - dnl Use toolkit scroll bars if configured for GTK or X toolkit and either dnl using Motif or Xaw3d is available, and unless dnl --with-toolkit-scroll-bars=no was specified.