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.
This commit is contained in:
parent
7eb1ac33ed
commit
d5096f16c6
4 changed files with 40 additions and 32 deletions
|
@ -1,5 +1,8 @@
|
|||
2010-04-30 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* configure.in (TOOLKIT_LIBW) [HAVE_GTK]: Set to $GTK_LIBS.
|
||||
(OLDXMENU, LIBXMENU): New output variables.
|
||||
|
||||
* configure.in (OTHER_OBJ): New output variable.
|
||||
|
||||
2010-04-28 Glenn Morris <rgm@gnu.org>
|
||||
|
|
27
configure.in
27
configure.in
|
@ -2900,18 +2900,41 @@ if test "${USE_X_TOOLKIT}" != "none" ; then
|
|||
fi
|
||||
AC_SUBST(WIDGET_OBJ)
|
||||
|
||||
TOOLKIT_LIBW=
|
||||
case "$USE_X_TOOLKIT" in
|
||||
MOTIF) TOOLKIT_LIBW="$MOTIF_LIBW" ;;
|
||||
LUCID) TOOLKIT_LIBW="$LUCID_LIBW" ;;
|
||||
*) TOOLKIT_LIBW= ;;
|
||||
none) test "x$HAVE_GTK" = "xyes" && TOOLKIT_LIBW="$GTK_LIBS" ;;
|
||||
esac
|
||||
AC_SUBST(TOOLKIT_LIBW)
|
||||
|
||||
## The X Menu stuff is present in the X10 distribution, but missing
|
||||
## from X11. If we have X10, just use the installed library;
|
||||
## otherwise, use our own copy.
|
||||
if test "${HAVE_X11}" = "yes" ; then
|
||||
AC_DEFINE(HAVE_X11, 1,
|
||||
[Define to 1 if you want to use version 11 of X windows.
|
||||
Otherwise, Emacs expects to use version 10.])
|
||||
|
||||
if test "$USE_X_TOOLKIT" = "none"; then
|
||||
OLDXMENU="\${oldXMenudir}libXMenu11.a"
|
||||
else
|
||||
OLDXMENU="\${lwlibdir}liblw.a"
|
||||
fi
|
||||
LIBXMENU="\$(OLDXMENU)"
|
||||
else
|
||||
OLDXMENU=
|
||||
LIBXMENU="-lXMenu"
|
||||
fi
|
||||
|
||||
if test "$HAVE_GTK" = "yes"; then
|
||||
OLDXMENU=
|
||||
LIBXMENU=
|
||||
fi
|
||||
|
||||
AC_SUBST(OLDXMENU)
|
||||
AC_SUBST(LIBXMENU)
|
||||
|
||||
if test "${HAVE_MENUS}" = "yes" ; then
|
||||
AC_DEFINE(HAVE_MENUS, 1,
|
||||
[Define to 1 if you have mouse menus.
|
||||
|
@ -2935,7 +2958,7 @@ if test "$opsys" = "cygwin"; then
|
|||
## Cygwin differs because of its unexec().
|
||||
OTHER_OBJ="$OTHER_OBJ lastfile.o"
|
||||
else
|
||||
CYGWIN_OBJ=
|
||||
CYGWIN_OBJ=
|
||||
OTHER_OBJ="lastfile.o $OTHER_OBJ"
|
||||
fi
|
||||
AC_SUBST(CYGWIN_OBJ)
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
2010-04-30 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* Makefile.in (OLDXMENU, LIBXMENU) [HAVE_MENUS]:
|
||||
Set with configure, not cpp.
|
||||
(LIBW): Remove, replace with $TOOLKIT_LIBW.
|
||||
|
||||
* Makefile.in (mallocobj): Remove.
|
||||
(otherobj): Simplify using @OTHER_OBJ@.
|
||||
|
||||
|
|
|
@ -254,43 +254,21 @@ ALL_OBJC_CFLAGS=$(ALL_CFLAGS) @GNU_OBJC_CFLAGS@
|
|||
$(CC) -c $(CPPFLAGS) $(ALL_OBJC_CFLAGS) $<
|
||||
|
||||
#ifdef HAVE_X_WINDOWS
|
||||
|
||||
/* This test needs to say in cpp for the time being, since s/ms-w32.h and
|
||||
s/msdos.h define HAVE_MENUS, possibly overriding configure. */
|
||||
#ifdef HAVE_MENUS
|
||||
|
||||
/* The X Menu stuff is present in the X10 distribution, but missing
|
||||
from X11. If we have X10, just use the installed library;
|
||||
otherwise, use our own copy. */
|
||||
#ifdef HAVE_X11
|
||||
#ifdef USE_X_TOOLKIT
|
||||
OLDXMENU=${lwlibdir}liblw.a
|
||||
LIBXMENU= $(OLDXMENU)
|
||||
#else /* not USE_X_TOOLKIT */
|
||||
OLDXMENU= ${oldXMenudir}libXMenu11.a
|
||||
LIBXMENU= $(OLDXMENU)
|
||||
#endif /* not USE_X_TOOLKIT */
|
||||
#else /* not HAVE_X11 */
|
||||
LIBXMENU= -lXMenu
|
||||
#endif /* not HAVE_X11 */
|
||||
|
||||
OLDXMENU=@OLDXMENU@
|
||||
LIBXMENU=@LIBXMENU@
|
||||
#else /* not HAVE_MENUS */
|
||||
|
||||
/* Otherwise, do not worry about the menu library at all. */
|
||||
OLDXMENU=
|
||||
LIBXMENU=
|
||||
#endif /* not HAVE_MENUS */
|
||||
|
||||
#ifdef USE_X_TOOLKIT
|
||||
LIBW=$(TOOLKIT_LIBW)
|
||||
|
||||
LIBXT= $(LIBW) $(LIBXMU) -lXt $(LIBXTR6) -lXext
|
||||
|
||||
LIBXT=$(TOOLKIT_LIBW) $(LIBXMU) -lXt $(LIBXTR6) -lXext
|
||||
#else /* not USE_X_TOOLKIT */
|
||||
|
||||
#ifdef USE_GTK
|
||||
LIBW=@GTK_LIBS@
|
||||
OLDXMENU=
|
||||
LIBXMENU=
|
||||
#endif /* USE_GTK */
|
||||
|
||||
LIBXT=$(LIBW) $(LIBXSM)
|
||||
LIBXT=$(TOOLKIT_LIBW) $(LIBXSM)
|
||||
#endif /* not USE_X_TOOLKIT */
|
||||
|
||||
#ifdef HAVE_X11
|
||||
|
|
Loading…
Add table
Reference in a new issue