diff options
| author | Glenn Morris | 2010-04-29 18:50:17 -0700 |
|---|---|---|
| committer | Glenn Morris | 2010-04-29 18:50:17 -0700 |
| commit | d5096f16c6188a2eaba30d16eabbae9c25906b15 (patch) | |
| tree | e46430e81b015df15d0ba8f97b74c445cbb00caf | |
| parent | 7eb1ac33ed4ecb150dd0755292c2d74fb36400e3 (diff) | |
| download | emacs-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-- | ChangeLog | 3 | ||||
| -rw-r--r-- | configure.in | 27 | ||||
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/Makefile.in | 38 |
4 files changed, 40 insertions, 32 deletions
| @@ -1,5 +1,8 @@ | |||
| 1 | 2010-04-30 Glenn Morris <rgm@gnu.org> | 1 | 2010-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 | ||
| 5 | 2010-04-28 Glenn Morris <rgm@gnu.org> | 8 | 2010-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 | |||
| 2900 | fi | 2900 | fi |
| 2901 | AC_SUBST(WIDGET_OBJ) | 2901 | AC_SUBST(WIDGET_OBJ) |
| 2902 | 2902 | ||
| 2903 | TOOLKIT_LIBW= | ||
| 2903 | case "$USE_X_TOOLKIT" in | 2904 | case "$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" ;; |
| 2907 | esac | 2908 | esac |
| 2908 | AC_SUBST(TOOLKIT_LIBW) | 2909 | AC_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. | ||
| 2910 | if test "${HAVE_X11}" = "yes" ; then | 2914 | if 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)" | ||
| 2925 | else | ||
| 2926 | OLDXMENU= | ||
| 2927 | LIBXMENU="-lXMenu" | ||
| 2914 | fi | 2928 | fi |
| 2929 | |||
| 2930 | if test "$HAVE_GTK" = "yes"; then | ||
| 2931 | OLDXMENU= | ||
| 2932 | LIBXMENU= | ||
| 2933 | fi | ||
| 2934 | |||
| 2935 | AC_SUBST(OLDXMENU) | ||
| 2936 | AC_SUBST(LIBXMENU) | ||
| 2937 | |||
| 2915 | if test "${HAVE_MENUS}" = "yes" ; then | 2938 | if 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" |
| 2937 | else | 2960 | else |
| 2938 | CYGWIN_OBJ= | 2961 | CYGWIN_OBJ= |
| 2939 | OTHER_OBJ="lastfile.o $OTHER_OBJ" | 2962 | OTHER_OBJ="lastfile.o $OTHER_OBJ" |
| 2940 | fi | 2963 | fi |
| 2941 | AC_SUBST(CYGWIN_OBJ) | 2964 | AC_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 @@ | |||
| 1 | 2010-04-30 Glenn Morris <rgm@gnu.org> | 1 | 2010-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 | ||
| 264 | OLDXMENU=${lwlibdir}liblw.a | ||
| 265 | LIBXMENU= $(OLDXMENU) | ||
| 266 | #else /* not USE_X_TOOLKIT */ | ||
| 267 | OLDXMENU= ${oldXMenudir}libXMenu11.a | ||
| 268 | LIBXMENU= $(OLDXMENU) | ||
| 269 | #endif /* not USE_X_TOOLKIT */ | ||
| 270 | #else /* not HAVE_X11 */ | ||
| 271 | LIBXMENU= -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 | ||
| 261 | OLDXMENU=@OLDXMENU@ | ||
| 262 | LIBXMENU=@LIBXMENU@ | ||
| 274 | #else /* not HAVE_MENUS */ | 263 | #else /* not HAVE_MENUS */ |
| 275 | 264 | OLDXMENU= | |
| 276 | /* Otherwise, do not worry about the menu library at all. */ | ||
| 277 | LIBXMENU= | 265 | LIBXMENU= |
| 278 | #endif /* not HAVE_MENUS */ | 266 | #endif /* not HAVE_MENUS */ |
| 279 | 267 | ||
| 280 | #ifdef USE_X_TOOLKIT | 268 | #ifdef USE_X_TOOLKIT |
| 281 | LIBW=$(TOOLKIT_LIBW) | 269 | LIBXT=$(TOOLKIT_LIBW) $(LIBXMU) -lXt $(LIBXTR6) -lXext |
| 282 | |||
| 283 | LIBXT= $(LIBW) $(LIBXMU) -lXt $(LIBXTR6) -lXext | ||
| 284 | |||
| 285 | #else /* not USE_X_TOOLKIT */ | 270 | #else /* not USE_X_TOOLKIT */ |
| 286 | 271 | LIBXT=$(TOOLKIT_LIBW) $(LIBXSM) | |
| 287 | #ifdef USE_GTK | ||
| 288 | LIBW=@GTK_LIBS@ | ||
| 289 | OLDXMENU= | ||
| 290 | LIBXMENU= | ||
| 291 | #endif /* USE_GTK */ | ||
| 292 | |||
| 293 | LIBXT=$(LIBW) $(LIBXSM) | ||
| 294 | #endif /* not USE_X_TOOLKIT */ | 272 | #endif /* not USE_X_TOOLKIT */ |
| 295 | 273 | ||
| 296 | #ifdef HAVE_X11 | 274 | #ifdef HAVE_X11 |