* configure.in (LUCID_LIBW, LIBXP, WIDGET_OBJ): New output variables.
* src/Makefile.in (LIBXP, LUCID_LIBW, WIDGET_OBJ): Set via configure.
(MOTIF_LIBW): Use $LIBXP.
(otherobj): Use $WIDGET_OBJ.
+2010-04-27 Glenn Morris <rgm@gnu.org>
+
+ * configure.in (LUCID_LIBW, LIBXP, WIDGET_OBJ): New output variables.
+
2010-04-26 Dan Nicolaescu <dann@ics.uci.edu>
* configure.in (LIBS_MACHINE): Remove, unused.
dnl Do not put whitespace before the #include statements below.
dnl Older compilers (eg sunos4 cc) choke on it.
HAVE_XAW3D=no
+LUCID_LIBW=
if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
if test "$with_xaw3d" != no; then
AC_MSG_CHECKING(for xaw3d)
AC_MSG_RESULT([yes; using Lucid toolkit])
USE_X_TOOLKIT=LUCID
HAVE_XAW3D=yes
+ LUCID_LIBW=-lXaw3d
AC_DEFINE(HAVE_XAW3D, 1,
[Define to 1 if you have the Xaw3d library (-lXaw3d).])
else
if test $emacs_cv_xaw = yes; then
AC_MSG_RESULT([yes; using Lucid toolkit])
USE_X_TOOLKIT=LUCID
+ LUCID_LIBW=-lXaw
elif test x"${USE_X_TOOLKIT}" = xLUCID; then
AC_MSG_ERROR([Lucid toolkit requires X11/Xaw include files])
else
fi
fi
fi
+AC_SUBST(LUCID_LIBW)
X_TOOLKIT_TYPE=$USE_X_TOOLKIT
fi
fi
+LIBXP=
if test "${USE_X_TOOLKIT}" = "MOTIF"; then
AC_CACHE_CHECK(for Motif version 2.1, emacs_cv_motif_version_2_1,
[AC_TRY_COMPILE([#include <Xm/Xm.h>],
if test ${HAVE_LIBXP} = yes; then
AC_DEFINE(HAVE_LIBXP, 1,
[Define to 1 if you have the Xp library (-lXp).])
+ LIBXP=-lXp
fi
else
AC_CACHE_CHECK(for LessTif where some systems put it, emacs_cv_lesstif,
fi
fi
fi
+AC_SUBST(LIBXP)
dnl Use toolkit scroll bars if configured for GTK or X toolkit and either
dnl using Motif or Xaw3d is available, and unless
AC_SUBST(XMENU_OBJ)
AC_SUBST(XOBJ)
+WIDGET_OBJ=
if test "${USE_X_TOOLKIT}" != "none" ; then
+ WIDGET_OBJ=widget.o
AC_DEFINE(USE_X_TOOLKIT, 1, [Define to 1 if using an X toolkit.])
if test "${USE_X_TOOLKIT}" = "LUCID"; then
AC_DEFINE(USE_LUCID, 1, [Define to 1 if using the Lucid X toolkit.])
AC_DEFINE(USE_MOTIF, 1, [Define to 1 if using the Motif X toolkit.])
fi
fi
+AC_SUBST(WIDGET_OBJ)
if test "${HAVE_X11}" = "yes" ; then
AC_DEFINE(HAVE_X11, 1,
[Define to 1 if you want to use version 11 of X windows.
+2010-04-27 Glenn Morris <rgm@gnu.org>
+
+ * Makefile.in (LIBXP, LUCID_LIBW, WIDGET_OBJ): Set via configure.
+ (MOTIF_LIBW): Use $LIBXP.
+ (otherobj): Use $WIDGET_OBJ.
+
2010-04-26 Dan Nicolaescu <dann@ics.uci.edu>
* Makefile.in (LIBS_MACHINE): Remove, unused.
GTK_OBJ=@GTK_OBJ@
+LIBXP=@LIBXP@
LIBXSM=@LIBXSM@
XMENU_OBJ=@XMENU_OBJ@
XOBJ=@XOBJ@
+LUCID_LIBW=@LUCID_LIBW@
+
LIBSOUND= @LIBSOUND@
CFLAGS_SOUND= @CFLAGS_SOUND@
RSVG_LIBS= @RSVG_LIBS@
RSVG_CFLAGS= @RSVG_CFLAGS@
+## widget.o if USE_X_TOOLKIT, otherwise empty.
+WIDGET_OBJ=@WIDGET_OBJ@
+
LIBSELINUX_LIBS = @LIBSELINUX_LIBS@
INTERVALS_H = dispextern.h intervals.h composite.h
#ifdef USE_X_TOOLKIT
# define @X_TOOLKIT_TYPE@
-# if HAVE_XAW3D
-LUCID_LIBW= -lXaw3d
-# else
-LUCID_LIBW= -lXaw
-# endif
-# if defined (HAVE_MOTIF_2_1) && defined (HAVE_LIBXP)
-# define LIB_MOTIF_EXTRA -lXp
-# else
-# define LIB_MOTIF_EXTRA
-# endif
# ifdef LIB_MOTIF
-MOTIF_LIBW= LIB_MOTIF LIB_MOTIF_EXTRA
+MOTIF_LIBW= LIB_MOTIF $(LIBXP)
# else
-MOTIF_LIBW= -lXm LIB_MOTIF_EXTRA
+MOTIF_LIBW= -lXm $(LIBXP)
# endif
LIBW=$(@X_TOOLKIT_TYPE@_LIBW)
#endif /* SYSTEM_MALLOC */
-#ifdef USE_X_TOOLKIT
-widgetobj= widget.o
-#else /* not USE_X_TOOLKIT */
-widgetobj=
-#endif /* not USE_X_TOOLKIT */
-
-
/* define otherobj as list of object files that make-docfile
should not be told about. */
#ifdef CYGWIN
/* Cygwin differs because of its unexec(). */
-otherobj= $(termcapobj) $(gmallocobj) $(rallocobj) lastfile.o vm-limit.o $(widgetobj) $(LIBOBJS)
+otherobj= $(termcapobj) $(gmallocobj) $(rallocobj) lastfile.o vm-limit.o $(WIDGET_OBJ) $(LIBOBJS)
#else
-otherobj= $(termcapobj) lastfile.o $(mallocobj) $(widgetobj) $(LIBOBJS)
+otherobj= $(termcapobj) lastfile.o $(mallocobj) $(WIDGET_OBJ) $(LIBOBJS)
#endif
#ifdef HAVE_MOUSE