]> git.eshelyaron.com Git - emacs.git/commitdiff
Move MOTIF_LIBW to autoconf.
authorGlenn Morris <rgm@gnu.org>
Tue, 27 Apr 2010 07:02:12 +0000 (00:02 -0700)
committerGlenn Morris <rgm@gnu.org>
Tue, 27 Apr 2010 07:02:12 +0000 (00:02 -0700)
* configure.in (HAVE_MOTIF_2_1): Remove unused variable.
(LIBXP): No longer substitute in Makefiles.
(MOTIF_LIBW): New output variable.  Move system-specific settings here
from src/s files.

* src/Makefile.in (LIBXP): Remove, since included in MOTIF_LIBW.
(MOTIF_LIBW): Set with configure, not cpp.
* s/aix4-2.h (LIB_MOTIF):
* s/gnu-linux.h (LIB_MOTIF):
* s/unixware.h (LIB_MOTIF): Move to configure.in.

* admin/CPP-DEFINES: Remove LIB_MOTIF.

ChangeLog
admin/CPP-DEFINES
configure.in
src/ChangeLog
src/Makefile.in
src/s/aix4-2.h
src/s/gnu-linux.h
src/s/unixware.h

index 8926df34ad6027ea4d08425a78cbdb8914e64e6c..c9f1d0a5408c6415e959aeef4763c0e8d449ab3d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-04-27  Glenn Morris  <rgm@gnu.org>
+
+       * configure.in (HAVE_MOTIF_2_1): Remove unused variable.
+       (LIBXP): No longer substitute in Makefiles.
+       (MOTIF_LIBW): New output variable.  Move system-specific settings here
+       from src/s files.
+
 2010-04-27  Dan Nicolaescu  <dann@ics.uci.edu>
 
        Reduce CPP usage.
index 1e9085354c1f75c9e7e1e1b3871b67d39b83de8d..32febaf8e35493a7a4da94ac1c515cb0ca28e20a 100644 (file)
@@ -235,7 +235,6 @@ LIBS_TERMCAP
 LIBXMU
 LIB_GCC
 LIB_MATH
-LIB_MOTIF
 LIB_STANDARD
 LINKER
 LINUX_VERSION_CODE
index d4806195f185216cee0ae2cac37dfa244dd22a87..aab5f6d300beb78dfc760ec19e8ae4bea5daa13a 100644 (file)
@@ -1880,7 +1880,6 @@ int x = 5;
 Motif version prior to 2.1.
 #endif],
     emacs_cv_motif_version_2_1=yes, emacs_cv_motif_version_2_1=no)])
-  HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
   if test $emacs_cv_motif_version_2_1 = yes; then
     AC_CHECK_LIB(Xp, XpCreateContext, LIBXP=-lXp)
   else
@@ -1909,7 +1908,6 @@ Motif version prior to 2.1.
     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
@@ -2820,6 +2818,7 @@ AC_SUBST(XMENU_OBJ)
 AC_SUBST(XOBJ)
 
 WIDGET_OBJ=
+MOTIF_LIBW=
 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.])
@@ -2827,9 +2826,29 @@ if test "${USE_X_TOOLKIT}" != "none" ; then
     AC_DEFINE(USE_LUCID, 1, [Define to 1 if using the Lucid X toolkit.])
   elif test "${USE_X_TOOLKIT}" = "MOTIF"; then
     AC_DEFINE(USE_MOTIF, 1, [Define to 1 if using the Motif X toolkit.])
+    MOTIF_LIBW=-lXm
+    case "$opsys" in
+      gnu-linux)
+        ## Paul Abrahams <abrahams at equinox.shaysnet.com> says this is needed.
+        MOTIF_LIBW="$MOTIF_LIBW -lXpm"
+        ;;
+
+      unixware)
+        ## Richard Anthony Ryan <ryanr at ellingtn.ftc.nrcs.usda.gov>
+        ## says -lXimp is needed in UNIX_SV ... 4.2 1.1.2.
+        MOTIF_LIBW="MOTIF_LIBW -lXimp"
+        ;;
+
+      aix4-2)
+        ## olson@mcs.anl.gov says -li18n is needed by -lXm.
+        MOTIF_LIBW="$MOTIF_LIBW -li18n"
+        ;;
+    esac
+    MOTIF_LIBW="$MOTIF_LIBW $LIBXP"
   fi
 fi
 AC_SUBST(WIDGET_OBJ)
+AC_SUBST(MOTIF_LIBW)
 if test "${HAVE_X11}" = "yes" ; then
   AC_DEFINE(HAVE_X11, 1,
            [Define to 1 if you want to use version 11 of X windows.
index 53d11c87a63dcc5a5bd3ae3870809903a027f968..41d0fb414f7c5c9c86102b9c814692f0e4541ea1 100644 (file)
@@ -1,3 +1,11 @@
+2010-04-27  Glenn Morris  <rgm@gnu.org>
+
+       * Makefile.in (LIBXP): Remove, since included in MOTIF_LIBW.
+       (MOTIF_LIBW): Set with configure, not cpp.
+       * s/aix4-2.h (LIB_MOTIF):
+       * s/gnu-linux.h (LIB_MOTIF):
+       * s/unixware.h (LIB_MOTIF): Move to configure.in.
+
 2010-04-27  Dan Nicolaescu  <dann@ics.uci.edu>
 
        Reduce CPP usage.
index e1933a3738845c64b3ec6f10237002ca2293fa66..5b4426686d04c8c778e5e9607ea75fe3528bc359 100644 (file)
@@ -86,13 +86,13 @@ GCONF_LIBS = @GCONF_LIBS@
 
 GTK_OBJ=@GTK_OBJ@
 
-LIBXP=@LIBXP@
 LIBXSM=@LIBXSM@
 
 XMENU_OBJ=@XMENU_OBJ@
 XOBJ=@XOBJ@
 
 LUCID_LIBW=@LUCID_LIBW@
+MOTIF_LIBW=@MOTIF_LIBW@
 
 LIBSOUND= @LIBSOUND@
 CFLAGS_SOUND= @CFLAGS_SOUND@
@@ -256,11 +256,6 @@ LIBXMENU=
 
 #ifdef USE_X_TOOLKIT
 # define @X_TOOLKIT_TYPE@
-# ifdef LIB_MOTIF
-MOTIF_LIBW= LIB_MOTIF $(LIBXP)
-# else
-MOTIF_LIBW= -lXm $(LIBXP)
-# endif
 LIBW=$(@X_TOOLKIT_TYPE@_LIBW)
 
 #ifdef HAVE_X11XTR6
index 32bc67bfd46c27b6fb006b28e0cdfacbf7c4fb52..c14835531dfda84f4f447a3c4b3a5906b494f892 100644 (file)
@@ -135,9 +135,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #define POSIX_SIGNALS
 #undef sigmask
 
-/* olson@mcs.anl.gov says -li18n is needed by -lXm.  */
-#define LIB_MOTIF -lXm -li18n
-
 #ifndef HAVE_LIBXMU
 #define LIBXMU
 
@@ -148,7 +145,7 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 /* On AIX Emacs uses the gmalloc.c malloc implementation.  But given
    the way this system works, libc functions that return malloced
    memory use the libc malloc implementation. Calling xfree or
-   xrealloc on the results of such functions results in a crash. 
+   xrealloc on the results of such functions results in a crash.
 
    One solution for this could be to define SYSTEM_MALLOC here, but
    that does not currently work on this system.
index 3d470032efc23b106b747edc450a0dd1f909b058..948f96a1e406f8409b8c187700c39616302ccc20 100644 (file)
@@ -197,9 +197,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
    anyone's still using Emacs on those.  --fx 2002-12-14  */
 /* #define C_SWITCH_SYSTEM -D_BSD_SOURCE */
 
-/* Paul Abrahams <abrahams@equinox.shaysnet.com> says this is needed.  */
-#define LIB_MOTIF -lXm -lXpm
-
 #ifdef HAVE_LIBNCURSES
 #define TERMINFO
 #define LIBS_TERMCAP -lncurses
index 27fd41b74168dfb01d3b6f531b34cd238840eb35..d019b8bba805577cca2d4a0bb99cb3338e9650f3 100644 (file)
@@ -59,14 +59,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 /* Use libw.a along with X11R6 Xt.  */
 #define NEED_LIBW
 
-/* ryanr@ellingtn.ftc.nrcs.usda.gov (Richard Anthony Ryan) says -lXimp
-   is needed in UNIX_SV ... 4.2 1.1.2.  */
-#define LIB_MOTIF -lXm -lXimp
-
-/* arch-tag: 9bbfcfc1-19be-45a1-9699-af57b87da2c6
-   (do not change this comment) */
-
-
 /* Data type of load average, as read out of kmem.  */
 
 #define LOAD_AVE_TYPE long