aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2010-04-26 19:36:20 -0700
committerGlenn Morris2010-04-26 19:36:20 -0700
commitb678dd8b8e406bcb65375723b72f239263bf5347 (patch)
tree3fc15f3b042a81f5aa34e026df02604b6de41556
parent10ccb130e0581fd1a27edef2a435d53b5576d9b3 (diff)
downloademacs-b678dd8b8e406bcb65375723b72f239263bf5347.tar.gz
emacs-b678dd8b8e406bcb65375723b72f239263bf5347.zip
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.
-rw-r--r--ChangeLog4
-rw-r--r--configure.in10
-rw-r--r--src/ChangeLog6
-rw-r--r--src/Makefile.in31
4 files changed, 30 insertions, 21 deletions
diff --git a/ChangeLog b/ChangeLog
index 02f7400ede0..efbc1891abf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
12010-04-27 Glenn Morris <rgm@gnu.org>
2
3 * configure.in (LUCID_LIBW, LIBXP, WIDGET_OBJ): New output variables.
4
12010-04-26 Dan Nicolaescu <dann@ics.uci.edu> 52010-04-26 Dan Nicolaescu <dann@ics.uci.edu>
2 6
3 * configure.in (LIBS_MACHINE): Remove, unused. 7 * configure.in (LIBS_MACHINE): Remove, unused.
diff --git a/configure.in b/configure.in
index 535d58c5d43..cc50ae4fb86 100644
--- a/configure.in
+++ b/configure.in
@@ -1784,6 +1784,7 @@ AC_SUBST(LIBSELINUX_LIBS)
1784dnl Do not put whitespace before the #include statements below. 1784dnl Do not put whitespace before the #include statements below.
1785dnl Older compilers (eg sunos4 cc) choke on it. 1785dnl Older compilers (eg sunos4 cc) choke on it.
1786HAVE_XAW3D=no 1786HAVE_XAW3D=no
1787LUCID_LIBW=
1787if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then 1788if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
1788 if test "$with_xaw3d" != no; then 1789 if test "$with_xaw3d" != no; then
1789 AC_MSG_CHECKING(for xaw3d) 1790 AC_MSG_CHECKING(for xaw3d)
@@ -1801,6 +1802,7 @@ if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
1801 AC_MSG_RESULT([yes; using Lucid toolkit]) 1802 AC_MSG_RESULT([yes; using Lucid toolkit])
1802 USE_X_TOOLKIT=LUCID 1803 USE_X_TOOLKIT=LUCID
1803 HAVE_XAW3D=yes 1804 HAVE_XAW3D=yes
1805 LUCID_LIBW=-lXaw3d
1804 AC_DEFINE(HAVE_XAW3D, 1, 1806 AC_DEFINE(HAVE_XAW3D, 1,
1805 [Define to 1 if you have the Xaw3d library (-lXaw3d).]) 1807 [Define to 1 if you have the Xaw3d library (-lXaw3d).])
1806 else 1808 else
@@ -1816,6 +1818,7 @@ if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
1816 if test $emacs_cv_xaw = yes; then 1818 if test $emacs_cv_xaw = yes; then
1817 AC_MSG_RESULT([yes; using Lucid toolkit]) 1819 AC_MSG_RESULT([yes; using Lucid toolkit])
1818 USE_X_TOOLKIT=LUCID 1820 USE_X_TOOLKIT=LUCID
1821 LUCID_LIBW=-lXaw
1819 elif test x"${USE_X_TOOLKIT}" = xLUCID; then 1822 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
1820 AC_MSG_ERROR([Lucid toolkit requires X11/Xaw include files]) 1823 AC_MSG_ERROR([Lucid toolkit requires X11/Xaw include files])
1821 else 1824 else
@@ -1824,6 +1827,7 @@ if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
1824 fi 1827 fi
1825 fi 1828 fi
1826fi 1829fi
1830AC_SUBST(LUCID_LIBW)
1827 1831
1828X_TOOLKIT_TYPE=$USE_X_TOOLKIT 1832X_TOOLKIT_TYPE=$USE_X_TOOLKIT
1829 1833
@@ -1863,6 +1867,7 @@ if test "${HAVE_X11}" = "yes"; then
1863 fi 1867 fi
1864fi 1868fi
1865 1869
1870LIBXP=
1866if test "${USE_X_TOOLKIT}" = "MOTIF"; then 1871if test "${USE_X_TOOLKIT}" = "MOTIF"; then
1867 AC_CACHE_CHECK(for Motif version 2.1, emacs_cv_motif_version_2_1, 1872 AC_CACHE_CHECK(for Motif version 2.1, emacs_cv_motif_version_2_1,
1868 [AC_TRY_COMPILE([#include <Xm/Xm.h>], 1873 [AC_TRY_COMPILE([#include <Xm/Xm.h>],
@@ -1881,6 +1886,7 @@ Motif version prior to 2.1.
1881 if test ${HAVE_LIBXP} = yes; then 1886 if test ${HAVE_LIBXP} = yes; then
1882 AC_DEFINE(HAVE_LIBXP, 1, 1887 AC_DEFINE(HAVE_LIBXP, 1,
1883 [Define to 1 if you have the Xp library (-lXp).]) 1888 [Define to 1 if you have the Xp library (-lXp).])
1889 LIBXP=-lXp
1884 fi 1890 fi
1885 else 1891 else
1886 AC_CACHE_CHECK(for LessTif where some systems put it, emacs_cv_lesstif, 1892 AC_CACHE_CHECK(for LessTif where some systems put it, emacs_cv_lesstif,
@@ -1908,6 +1914,7 @@ Motif version prior to 2.1.
1908 fi 1914 fi
1909 fi 1915 fi
1910fi 1916fi
1917AC_SUBST(LIBXP)
1911 1918
1912dnl Use toolkit scroll bars if configured for GTK or X toolkit and either 1919dnl Use toolkit scroll bars if configured for GTK or X toolkit and either
1913dnl using Motif or Xaw3d is available, and unless 1920dnl using Motif or Xaw3d is available, and unless
@@ -2813,7 +2820,9 @@ fi
2813AC_SUBST(XMENU_OBJ) 2820AC_SUBST(XMENU_OBJ)
2814AC_SUBST(XOBJ) 2821AC_SUBST(XOBJ)
2815 2822
2823WIDGET_OBJ=
2816if test "${USE_X_TOOLKIT}" != "none" ; then 2824if test "${USE_X_TOOLKIT}" != "none" ; then
2825 WIDGET_OBJ=widget.o
2817 AC_DEFINE(USE_X_TOOLKIT, 1, [Define to 1 if using an X toolkit.]) 2826 AC_DEFINE(USE_X_TOOLKIT, 1, [Define to 1 if using an X toolkit.])
2818 if test "${USE_X_TOOLKIT}" = "LUCID"; then 2827 if test "${USE_X_TOOLKIT}" = "LUCID"; then
2819 AC_DEFINE(USE_LUCID, 1, [Define to 1 if using the Lucid X toolkit.]) 2828 AC_DEFINE(USE_LUCID, 1, [Define to 1 if using the Lucid X toolkit.])
@@ -2821,6 +2830,7 @@ if test "${USE_X_TOOLKIT}" != "none" ; then
2821 AC_DEFINE(USE_MOTIF, 1, [Define to 1 if using the Motif X toolkit.]) 2830 AC_DEFINE(USE_MOTIF, 1, [Define to 1 if using the Motif X toolkit.])
2822 fi 2831 fi
2823fi 2832fi
2833AC_SUBST(WIDGET_OBJ)
2824if test "${HAVE_X11}" = "yes" ; then 2834if test "${HAVE_X11}" = "yes" ; then
2825 AC_DEFINE(HAVE_X11, 1, 2835 AC_DEFINE(HAVE_X11, 1,
2826 [Define to 1 if you want to use version 11 of X windows. 2836 [Define to 1 if you want to use version 11 of X windows.
diff --git a/src/ChangeLog b/src/ChangeLog
index 9807cd45f3a..1dbdf0fbae8 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12010-04-27 Glenn Morris <rgm@gnu.org>
2
3 * Makefile.in (LIBXP, LUCID_LIBW, WIDGET_OBJ): Set via configure.
4 (MOTIF_LIBW): Use $LIBXP.
5 (otherobj): Use $WIDGET_OBJ.
6
12010-04-26 Dan Nicolaescu <dann@ics.uci.edu> 72010-04-26 Dan Nicolaescu <dann@ics.uci.edu>
2 8
3 * Makefile.in (LIBS_MACHINE): Remove, unused. 9 * Makefile.in (LIBS_MACHINE): Remove, unused.
diff --git a/src/Makefile.in b/src/Makefile.in
index 9b281e93448..adf4400a1da 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -92,17 +92,23 @@ GCONF_LIBS = @GCONF_LIBS@
92 92
93GTK_OBJ=@GTK_OBJ@ 93GTK_OBJ=@GTK_OBJ@
94 94
95LIBXP=@LIBXP@
95LIBXSM=@LIBXSM@ 96LIBXSM=@LIBXSM@
96 97
97XMENU_OBJ=@XMENU_OBJ@ 98XMENU_OBJ=@XMENU_OBJ@
98XOBJ=@XOBJ@ 99XOBJ=@XOBJ@
99 100
101LUCID_LIBW=@LUCID_LIBW@
102
100LIBSOUND= @LIBSOUND@ 103LIBSOUND= @LIBSOUND@
101CFLAGS_SOUND= @CFLAGS_SOUND@ 104CFLAGS_SOUND= @CFLAGS_SOUND@
102 105
103RSVG_LIBS= @RSVG_LIBS@ 106RSVG_LIBS= @RSVG_LIBS@
104RSVG_CFLAGS= @RSVG_CFLAGS@ 107RSVG_CFLAGS= @RSVG_CFLAGS@
105 108
109## widget.o if USE_X_TOOLKIT, otherwise empty.
110WIDGET_OBJ=@WIDGET_OBJ@
111
106LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ 112LIBSELINUX_LIBS = @LIBSELINUX_LIBS@
107 113
108INTERVALS_H = dispextern.h intervals.h composite.h 114INTERVALS_H = dispextern.h intervals.h composite.h
@@ -277,20 +283,10 @@ LIBXMENU=
277 283
278#ifdef USE_X_TOOLKIT 284#ifdef USE_X_TOOLKIT
279# define @X_TOOLKIT_TYPE@ 285# define @X_TOOLKIT_TYPE@
280# if HAVE_XAW3D
281LUCID_LIBW= -lXaw3d
282# else
283LUCID_LIBW= -lXaw
284# endif
285# if defined (HAVE_MOTIF_2_1) && defined (HAVE_LIBXP)
286# define LIB_MOTIF_EXTRA -lXp
287# else
288# define LIB_MOTIF_EXTRA
289# endif
290# ifdef LIB_MOTIF 286# ifdef LIB_MOTIF
291MOTIF_LIBW= LIB_MOTIF LIB_MOTIF_EXTRA 287MOTIF_LIBW= LIB_MOTIF $(LIBXP)
292# else 288# else
293MOTIF_LIBW= -lXm LIB_MOTIF_EXTRA 289MOTIF_LIBW= -lXm $(LIBXP)
294# endif 290# endif
295LIBW=$(@X_TOOLKIT_TYPE@_LIBW) 291LIBW=$(@X_TOOLKIT_TYPE@_LIBW)
296 292
@@ -490,20 +486,13 @@ mallocobj = $(gmallocobj) $(rallocobj) vm-limit.o
490#endif /* SYSTEM_MALLOC */ 486#endif /* SYSTEM_MALLOC */
491 487
492 488
493#ifdef USE_X_TOOLKIT
494widgetobj= widget.o
495#else /* not USE_X_TOOLKIT */
496widgetobj=
497#endif /* not USE_X_TOOLKIT */
498
499
500/* define otherobj as list of object files that make-docfile 489/* define otherobj as list of object files that make-docfile
501 should not be told about. */ 490 should not be told about. */
502#ifdef CYGWIN 491#ifdef CYGWIN
503/* Cygwin differs because of its unexec(). */ 492/* Cygwin differs because of its unexec(). */
504otherobj= $(termcapobj) $(gmallocobj) $(rallocobj) lastfile.o vm-limit.o $(widgetobj) $(LIBOBJS) 493otherobj= $(termcapobj) $(gmallocobj) $(rallocobj) lastfile.o vm-limit.o $(WIDGET_OBJ) $(LIBOBJS)
505#else 494#else
506otherobj= $(termcapobj) lastfile.o $(mallocobj) $(widgetobj) $(LIBOBJS) 495otherobj= $(termcapobj) lastfile.o $(mallocobj) $(WIDGET_OBJ) $(LIBOBJS)
507#endif 496#endif
508 497
509#ifdef HAVE_MOUSE 498#ifdef HAVE_MOUSE