From 8fdac2c337db94e64bbb679cac3efdc533168e9a Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 27 Apr 2010 01:09:01 -0700 Subject: [PATCH] Move LIBXTR6 from cpp to autoconf. * configure.in (LIBXTR6): New output variable. Move unixware special case here from src/s/unixware.h. * src/Makefile.in (LIBXTR6): Set with configure, not cpp. * src/s/unixware.h (NEED_LIBW): Remove definition. * admin/CPP-DEFINES: Remove NEED_LIBW. --- ChangeLog | 3 +++ admin/CPP-DEFINES | 1 - configure.in | 7 +++++++ src/ChangeLog | 3 +++ src/Makefile.in | 10 ++-------- src/s/unixware.h | 3 --- 6 files changed, 15 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index aadc7a3c72e..11a934e529b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2010-04-27 Glenn Morris + * configure.in (LIBXTR6): New output variable. Move unixware special + case here from src/s/unixware.h. + * configure.in (LUCID_LIBW, MOTIF_LIBW): No longer substitute in Makefiles. (TOOLKIT_LIBW): New output variable, replacing LUCID_LIBW/MOTIF_LIBW. diff --git a/admin/CPP-DEFINES b/admin/CPP-DEFINES index 32febaf8e35..909718367a9 100644 --- a/admin/CPP-DEFINES +++ b/admin/CPP-DEFINES @@ -250,7 +250,6 @@ MODE_LINE_BINARY_TEXT MUST_UNDEF__STDC__ NEED_BSDTTY NEED_ERRNO -NEED_LIBW NEED_UNISTD_H NLIST_STRUCT NOT_C_CODE diff --git a/configure.in b/configure.in index 1c67713f0b6..281d06995d7 100644 --- a/configure.in +++ b/configure.in @@ -1833,6 +1833,7 @@ fi X_TOOLKIT_TYPE=$USE_X_TOOLKIT +LIBXTR6= if test "${USE_X_TOOLKIT}" != "none"; then AC_MSG_CHECKING(X11 toolkit version) AC_CACHE_VAL(emacs_cv_x11_toolkit_version_6, @@ -1846,6 +1847,11 @@ fail; AC_MSG_RESULT(6 or newer) AC_DEFINE(HAVE_X11XTR6, 1, [Define to 1 if you have the X11R6 or newer version of Xt.]) + LIBXTR6="-lSM -lICE" + case "$opsys" in + ## Use libw.a along with X11R6 Xt. + unixware) LIBXTR6="$LIBXTR6 -lw" ;; + esac else AC_MSG_RESULT(before 6) fi @@ -1861,6 +1867,7 @@ dnl tranle@intellicorp.com says libXmu.a can need XtMalloc in libXt.a to link. AC_CHECK_LIB(Xmu, XmuConvertStandardSelection) test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS" fi +AC_SUBST(LIBXTR6) # On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D. if test "${HAVE_X11}" = "yes"; then diff --git a/src/ChangeLog b/src/ChangeLog index cb9fefea39b..98a93855adc 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2010-04-27 Glenn Morris + * Makefile.in (LIBXTR6): Set with configure, not cpp. + * s/unixware.h (NEED_LIBW): Remove definition. + * Makefile.in (LUCID_LIBW, MOTIF_LIBW): Remove, replacing by... (TOOLKIT_LIBW): New, set by configure. (@X_TOOLKIT_TYPE@): No longer define it. diff --git a/src/Makefile.in b/src/Makefile.in index 9c55ebbb96b..9e505741524 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -88,6 +88,8 @@ GTK_OBJ=@GTK_OBJ@ LIBXSM=@LIBXSM@ +LIBXTR6=@LIBXTR6@ + XMENU_OBJ=@XMENU_OBJ@ XOBJ=@XOBJ@ @@ -256,14 +258,6 @@ LIBXMENU= #ifdef USE_X_TOOLKIT LIBW=$(TOOLKIT_LIBW) -#ifdef HAVE_X11XTR6 -#ifdef NEED_LIBW -LIBXTR6 = -lSM -lICE -lw -#else -LIBXTR6 = -lSM -lICE -#endif -#endif - #ifndef LIBXMU #define LIBXMU -lXmu #endif diff --git a/src/s/unixware.h b/src/s/unixware.h index d019b8bba80..d1e8748d913 100644 --- a/src/s/unixware.h +++ b/src/s/unixware.h @@ -56,9 +56,6 @@ along with GNU Emacs. If not, see . */ pty_name[sizeof(pty_name) - 1] = 0; \ } -/* Use libw.a along with X11R6 Xt. */ -#define NEED_LIBW - /* Data type of load average, as read out of kmem. */ #define LOAD_AVE_TYPE long -- 2.39.2