diff options
| author | Glenn Morris | 2010-04-26 19:36:20 -0700 |
|---|---|---|
| committer | Glenn Morris | 2010-04-26 19:36:20 -0700 |
| commit | b678dd8b8e406bcb65375723b72f239263bf5347 (patch) | |
| tree | 3fc15f3b042a81f5aa34e026df02604b6de41556 | |
| parent | 10ccb130e0581fd1a27edef2a435d53b5576d9b3 (diff) | |
| download | emacs-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-- | ChangeLog | 4 | ||||
| -rw-r--r-- | configure.in | 10 | ||||
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/Makefile.in | 31 |
4 files changed, 30 insertions, 21 deletions
| @@ -1,3 +1,7 @@ | |||
| 1 | 2010-04-27 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * configure.in (LUCID_LIBW, LIBXP, WIDGET_OBJ): New output variables. | ||
| 4 | |||
| 1 | 2010-04-26 Dan Nicolaescu <dann@ics.uci.edu> | 5 | 2010-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) | |||
| 1784 | dnl Do not put whitespace before the #include statements below. | 1784 | dnl Do not put whitespace before the #include statements below. |
| 1785 | dnl Older compilers (eg sunos4 cc) choke on it. | 1785 | dnl Older compilers (eg sunos4 cc) choke on it. |
| 1786 | HAVE_XAW3D=no | 1786 | HAVE_XAW3D=no |
| 1787 | LUCID_LIBW= | ||
| 1787 | if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then | 1788 | if 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 |
| 1826 | fi | 1829 | fi |
| 1830 | AC_SUBST(LUCID_LIBW) | ||
| 1827 | 1831 | ||
| 1828 | X_TOOLKIT_TYPE=$USE_X_TOOLKIT | 1832 | X_TOOLKIT_TYPE=$USE_X_TOOLKIT |
| 1829 | 1833 | ||
| @@ -1863,6 +1867,7 @@ if test "${HAVE_X11}" = "yes"; then | |||
| 1863 | fi | 1867 | fi |
| 1864 | fi | 1868 | fi |
| 1865 | 1869 | ||
| 1870 | LIBXP= | ||
| 1866 | if test "${USE_X_TOOLKIT}" = "MOTIF"; then | 1871 | if 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 |
| 1910 | fi | 1916 | fi |
| 1917 | AC_SUBST(LIBXP) | ||
| 1911 | 1918 | ||
| 1912 | dnl Use toolkit scroll bars if configured for GTK or X toolkit and either | 1919 | dnl Use toolkit scroll bars if configured for GTK or X toolkit and either |
| 1913 | dnl using Motif or Xaw3d is available, and unless | 1920 | dnl using Motif or Xaw3d is available, and unless |
| @@ -2813,7 +2820,9 @@ fi | |||
| 2813 | AC_SUBST(XMENU_OBJ) | 2820 | AC_SUBST(XMENU_OBJ) |
| 2814 | AC_SUBST(XOBJ) | 2821 | AC_SUBST(XOBJ) |
| 2815 | 2822 | ||
| 2823 | WIDGET_OBJ= | ||
| 2816 | if test "${USE_X_TOOLKIT}" != "none" ; then | 2824 | if 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 |
| 2823 | fi | 2832 | fi |
| 2833 | AC_SUBST(WIDGET_OBJ) | ||
| 2824 | if test "${HAVE_X11}" = "yes" ; then | 2834 | if 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 @@ | |||
| 1 | 2010-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 | |||
| 1 | 2010-04-26 Dan Nicolaescu <dann@ics.uci.edu> | 7 | 2010-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 | ||
| 93 | GTK_OBJ=@GTK_OBJ@ | 93 | GTK_OBJ=@GTK_OBJ@ |
| 94 | 94 | ||
| 95 | LIBXP=@LIBXP@ | ||
| 95 | LIBXSM=@LIBXSM@ | 96 | LIBXSM=@LIBXSM@ |
| 96 | 97 | ||
| 97 | XMENU_OBJ=@XMENU_OBJ@ | 98 | XMENU_OBJ=@XMENU_OBJ@ |
| 98 | XOBJ=@XOBJ@ | 99 | XOBJ=@XOBJ@ |
| 99 | 100 | ||
| 101 | LUCID_LIBW=@LUCID_LIBW@ | ||
| 102 | |||
| 100 | LIBSOUND= @LIBSOUND@ | 103 | LIBSOUND= @LIBSOUND@ |
| 101 | CFLAGS_SOUND= @CFLAGS_SOUND@ | 104 | CFLAGS_SOUND= @CFLAGS_SOUND@ |
| 102 | 105 | ||
| 103 | RSVG_LIBS= @RSVG_LIBS@ | 106 | RSVG_LIBS= @RSVG_LIBS@ |
| 104 | RSVG_CFLAGS= @RSVG_CFLAGS@ | 107 | RSVG_CFLAGS= @RSVG_CFLAGS@ |
| 105 | 108 | ||
| 109 | ## widget.o if USE_X_TOOLKIT, otherwise empty. | ||
| 110 | WIDGET_OBJ=@WIDGET_OBJ@ | ||
| 111 | |||
| 106 | LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ | 112 | LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ |
| 107 | 113 | ||
| 108 | INTERVALS_H = dispextern.h intervals.h composite.h | 114 | INTERVALS_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 | ||
| 281 | LUCID_LIBW= -lXaw3d | ||
| 282 | # else | ||
| 283 | LUCID_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 |
| 291 | MOTIF_LIBW= LIB_MOTIF LIB_MOTIF_EXTRA | 287 | MOTIF_LIBW= LIB_MOTIF $(LIBXP) |
| 292 | # else | 288 | # else |
| 293 | MOTIF_LIBW= -lXm LIB_MOTIF_EXTRA | 289 | MOTIF_LIBW= -lXm $(LIBXP) |
| 294 | # endif | 290 | # endif |
| 295 | LIBW=$(@X_TOOLKIT_TYPE@_LIBW) | 291 | LIBW=$(@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 | ||
| 494 | widgetobj= widget.o | ||
| 495 | #else /* not USE_X_TOOLKIT */ | ||
| 496 | widgetobj= | ||
| 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(). */ |
| 504 | otherobj= $(termcapobj) $(gmallocobj) $(rallocobj) lastfile.o vm-limit.o $(widgetobj) $(LIBOBJS) | 493 | otherobj= $(termcapobj) $(gmallocobj) $(rallocobj) lastfile.o vm-limit.o $(WIDGET_OBJ) $(LIBOBJS) |
| 505 | #else | 494 | #else |
| 506 | otherobj= $(termcapobj) lastfile.o $(mallocobj) $(widgetobj) $(LIBOBJS) | 495 | otherobj= $(termcapobj) lastfile.o $(mallocobj) $(WIDGET_OBJ) $(LIBOBJS) |
| 507 | #endif | 496 | #endif |
| 508 | 497 | ||
| 509 | #ifdef HAVE_MOUSE | 498 | #ifdef HAVE_MOUSE |