aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2010-04-29 18:50:17 -0700
committerGlenn Morris2010-04-29 18:50:17 -0700
commitd5096f16c6188a2eaba30d16eabbae9c25906b15 (patch)
treee46430e81b015df15d0ba8f97b74c445cbb00caf
parent7eb1ac33ed4ecb150dd0755292c2d74fb36400e3 (diff)
downloademacs-d5096f16c6188a2eaba30d16eabbae9c25906b15.tar.gz
emacs-d5096f16c6188a2eaba30d16eabbae9c25906b15.zip
Replace some xmenu cpp with autoconf.
* configure.in (TOOLKIT_LIBW) [HAVE_GTK]: Set to $GTK_LIBS. (OLDXMENU, LIBXMENU): New output variables. * src/Makefile.in (OLDXMENU, LIBXMENU) [HAVE_MENUS]: Set with configure, not cpp. (LIBW): Remove, replace with $TOOLKIT_LIBW.
-rw-r--r--ChangeLog3
-rw-r--r--configure.in27
-rw-r--r--src/ChangeLog4
-rw-r--r--src/Makefile.in38
4 files changed, 40 insertions, 32 deletions
diff --git a/ChangeLog b/ChangeLog
index 9bdf50b5965..75b2a53ccd2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
12010-04-30 Glenn Morris <rgm@gnu.org> 12010-04-30 Glenn Morris <rgm@gnu.org>
2 2
3 * configure.in (TOOLKIT_LIBW) [HAVE_GTK]: Set to $GTK_LIBS.
4 (OLDXMENU, LIBXMENU): New output variables.
5
3 * configure.in (OTHER_OBJ): New output variable. 6 * configure.in (OTHER_OBJ): New output variable.
4 7
52010-04-28 Glenn Morris <rgm@gnu.org> 82010-04-28 Glenn Morris <rgm@gnu.org>
diff --git a/configure.in b/configure.in
index db8402a4055..ce232b18d35 100644
--- a/configure.in
+++ b/configure.in
@@ -2900,18 +2900,41 @@ if test "${USE_X_TOOLKIT}" != "none" ; then
2900fi 2900fi
2901AC_SUBST(WIDGET_OBJ) 2901AC_SUBST(WIDGET_OBJ)
2902 2902
2903TOOLKIT_LIBW=
2903case "$USE_X_TOOLKIT" in 2904case "$USE_X_TOOLKIT" in
2904 MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;; 2905 MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;;
2905 LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;; 2906 LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;;
2906 *) TOOLKIT_LIBW= ;; 2907 none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;;
2907esac 2908esac
2908AC_SUBST(TOOLKIT_LIBW) 2909AC_SUBST(TOOLKIT_LIBW)
2909 2910
2911## The X Menu stuff is present in the X10 distribution, but missing
2912## from X11. If we have X10, just use the installed library;
2913## otherwise, use our own copy.
2910if test "${HAVE_X11}" = "yes" ; then 2914if test "${HAVE_X11}" = "yes" ; then
2911 AC_DEFINE(HAVE_X11, 1, 2915 AC_DEFINE(HAVE_X11, 1,
2912 [Define to 1 if you want to use version 11 of X windows. 2916 [Define to 1 if you want to use version 11 of X windows.
2913 Otherwise, Emacs expects to use version 10.]) 2917 Otherwise, Emacs expects to use version 10.])
2918
2919 if test "$USE_X_TOOLKIT" = "none"; then
2920 OLDXMENU="\${oldXMenudir}libXMenu11.a"
2921 else
2922 OLDXMENU="\${lwlibdir}liblw.a"
2923 fi
2924 LIBXMENU="\$(OLDXMENU)"
2925else
2926 OLDXMENU=
2927 LIBXMENU="-lXMenu"
2914fi 2928fi
2929
2930if test "$HAVE_GTK" = "yes"; then
2931 OLDXMENU=
2932 LIBXMENU=
2933fi
2934
2935AC_SUBST(OLDXMENU)
2936AC_SUBST(LIBXMENU)
2937
2915if test "${HAVE_MENUS}" = "yes" ; then 2938if test "${HAVE_MENUS}" = "yes" ; then
2916 AC_DEFINE(HAVE_MENUS, 1, 2939 AC_DEFINE(HAVE_MENUS, 1,
2917 [Define to 1 if you have mouse menus. 2940 [Define to 1 if you have mouse menus.
@@ -2935,7 +2958,7 @@ if test "$opsys" = "cygwin"; then
2935 ## Cygwin differs because of its unexec(). 2958 ## Cygwin differs because of its unexec().
2936 OTHER_OBJ="$OTHER_OBJ lastfile.o" 2959 OTHER_OBJ="$OTHER_OBJ lastfile.o"
2937else 2960else
2938CYGWIN_OBJ= 2961 CYGWIN_OBJ=
2939 OTHER_OBJ="lastfile.o $OTHER_OBJ" 2962 OTHER_OBJ="lastfile.o $OTHER_OBJ"
2940fi 2963fi
2941AC_SUBST(CYGWIN_OBJ) 2964AC_SUBST(CYGWIN_OBJ)
diff --git a/src/ChangeLog b/src/ChangeLog
index 8fe14886af9..ad02b0118e5 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,9 @@
12010-04-30 Glenn Morris <rgm@gnu.org> 12010-04-30 Glenn Morris <rgm@gnu.org>
2 2
3 * Makefile.in (OLDXMENU, LIBXMENU) [HAVE_MENUS]:
4 Set with configure, not cpp.
5 (LIBW): Remove, replace with $TOOLKIT_LIBW.
6
3 * Makefile.in (mallocobj): Remove. 7 * Makefile.in (mallocobj): Remove.
4 (otherobj): Simplify using @OTHER_OBJ@. 8 (otherobj): Simplify using @OTHER_OBJ@.
5 9
diff --git a/src/Makefile.in b/src/Makefile.in
index c49543b181c..9d60e403cf1 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -254,43 +254,21 @@ ALL_OBJC_CFLAGS=$(ALL_CFLAGS) @GNU_OBJC_CFLAGS@
254 $(CC) -c $(CPPFLAGS) $(ALL_OBJC_CFLAGS) $< 254 $(CC) -c $(CPPFLAGS) $(ALL_OBJC_CFLAGS) $<
255 255
256#ifdef HAVE_X_WINDOWS 256#ifdef HAVE_X_WINDOWS
257#ifdef HAVE_MENUS
258
259/* The X Menu stuff is present in the X10 distribution, but missing
260 from X11. If we have X10, just use the installed library;
261 otherwise, use our own copy. */
262#ifdef HAVE_X11
263#ifdef USE_X_TOOLKIT
264OLDXMENU=${lwlibdir}liblw.a
265LIBXMENU= $(OLDXMENU)
266#else /* not USE_X_TOOLKIT */
267OLDXMENU= ${oldXMenudir}libXMenu11.a
268LIBXMENU= $(OLDXMENU)
269#endif /* not USE_X_TOOLKIT */
270#else /* not HAVE_X11 */
271LIBXMENU= -lXMenu
272#endif /* not HAVE_X11 */
273 257
258/* This test needs to say in cpp for the time being, since s/ms-w32.h and
259 s/msdos.h define HAVE_MENUS, possibly overriding configure. */
260#ifdef HAVE_MENUS
261OLDXMENU=@OLDXMENU@
262LIBXMENU=@LIBXMENU@
274#else /* not HAVE_MENUS */ 263#else /* not HAVE_MENUS */
275 264OLDXMENU=
276/* Otherwise, do not worry about the menu library at all. */
277LIBXMENU= 265LIBXMENU=
278#endif /* not HAVE_MENUS */ 266#endif /* not HAVE_MENUS */
279 267
280#ifdef USE_X_TOOLKIT 268#ifdef USE_X_TOOLKIT
281LIBW=$(TOOLKIT_LIBW) 269LIBXT=$(TOOLKIT_LIBW) $(LIBXMU) -lXt $(LIBXTR6) -lXext
282
283LIBXT= $(LIBW) $(LIBXMU) -lXt $(LIBXTR6) -lXext
284
285#else /* not USE_X_TOOLKIT */ 270#else /* not USE_X_TOOLKIT */
286 271LIBXT=$(TOOLKIT_LIBW) $(LIBXSM)
287#ifdef USE_GTK
288LIBW=@GTK_LIBS@
289OLDXMENU=
290LIBXMENU=
291#endif /* USE_GTK */
292
293LIBXT=$(LIBW) $(LIBXSM)
294#endif /* not USE_X_TOOLKIT */ 272#endif /* not USE_X_TOOLKIT */
295 273
296#ifdef HAVE_X11 274#ifdef HAVE_X11