Mercurial > emacs
changeset 108123:2559def6146e
Replace some more cpp with autoconf.
* 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.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Mon, 26 Apr 2010 19:36:20 -0700 |
parents | b355e81f13c1 |
children | 8fead72884b2 |
files | ChangeLog configure.in src/ChangeLog src/Makefile.in |
diffstat | 4 files changed, 31 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Mon Apr 26 11:23:01 2010 -0700 +++ b/ChangeLog Mon Apr 26 19:36:20 2010 -0700 @@ -1,3 +1,7 @@ +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.
--- a/configure.in Mon Apr 26 11:23:01 2010 -0700 +++ b/configure.in Mon Apr 26 19:36:20 2010 -0700 @@ -1784,6 +1784,7 @@ 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) @@ -1801,6 +1802,7 @@ 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 @@ -1816,6 +1818,7 @@ 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 @@ -1824,6 +1827,7 @@ fi fi fi +AC_SUBST(LUCID_LIBW) X_TOOLKIT_TYPE=$USE_X_TOOLKIT @@ -1863,6 +1867,7 @@ 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>], @@ -1881,6 +1886,7 @@ 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, @@ -1908,6 +1914,7 @@ 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 @@ -2813,7 +2820,9 @@ 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.]) @@ -2821,6 +2830,7 @@ 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.
--- a/src/ChangeLog Mon Apr 26 11:23:01 2010 -0700 +++ b/src/ChangeLog Mon Apr 26 19:36:20 2010 -0700 @@ -1,3 +1,9 @@ +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.
--- a/src/Makefile.in Mon Apr 26 11:23:01 2010 -0700 +++ b/src/Makefile.in Mon Apr 26 19:36:20 2010 -0700 @@ -92,17 +92,23 @@ 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 @@ -277,20 +283,10 @@ #ifdef USE_X_TOOLKIT # define @X_TOOLKIT_TYPE@ -# if HAVE_XAW3D -LUCID_LIBW= -lXaw3d +# ifdef LIB_MOTIF +MOTIF_LIBW= LIB_MOTIF $(LIBXP) # 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 -# else -MOTIF_LIBW= -lXm LIB_MOTIF_EXTRA +MOTIF_LIBW= -lXm $(LIBXP) # endif LIBW=$(@X_TOOLKIT_TYPE@_LIBW) @@ -490,20 +486,13 @@ #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