From xemacs-m  Wed Jan  1 12:45:27 1997
Received: from bayserve.net (bay1.bayserve.net [206.148.244.200])
          by xemacs.cs.uiuc.edu (8.8.4/8.8.4) with ESMTP
	  id MAA27861 for <xemacs-beta@xemacs.org>; Wed, 1 Jan 1997 12:45:26 -0600 (CST)
Received: from localhost (jmiller@localhost) by  bayserve.net (8.7.2/8.7.2) with SMTP id NAA24677 for <xemacs-beta@xemacs.org>; Wed, 1 Jan 1997 13:49:53 -0500 (EST)
Date: Wed, 1 Jan 1997 13:49:53 -0500 (EST)
From: Jeff Miller <jmiller@bay1.bayserve.net>
To: beta-list <xemacs-beta@xemacs.org>
Subject: possible bug in config stuff
Message-ID: <Pine.SUN.3.95.970101131039.18839B-100000@bay1.bayserve.net>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII


I've been playing around with some of the configure options and tried to
do a compile with most stuff turned off.

configure \
--with-menubars=none \
--with-scrollbars=none \
--with-dialogs=none \
--with-toolbars=no \
--with-xpm=no \
--with-xface=no \
--with-gif=no \
--with-jpeg=no \
--with-png=no \
--with-database=no \
--with-offix=no \
--verbose  \
--with-sound=no 

followed by make beta will die in the final linking because it expects
to use -llw but nothing is made in lwlib.  After looking at
src/Makefile.in.in, I *think* I see the problem.    It looks like there is
some logic in there to only use -llw if necessary but -llw is hardcoded in
as well. 

To make a long story short , I think the following patch produces the
desired effect.

--- Makefile.in.in.orig Tue Dec 31 20:27:06 1996
+++ Makefile.in.in      Wed Jan  1 13:25:30 1997
@@ -548,7 +548,7 @@
 TOOLKIT_LIBS = -lXaw
 #endif /* ! LWLIB_USES_MOTIF */
 
-LIBX11_LIBS = -llw $(TOOLKIT_LIBS) $(XPM_LIBS) $(XFACE_LIBS) $(JPEG_LIBS)
PNG_LIBS $(USAGE_TRACKING_LIBS) 
+LIBX11_LIBS =  $(TOOLKIT_LIBS) $(XPM_LIBS) $(XFACE_LIBS) $(JPEG_LIBS)
PNG_LIBS $(USAGE_TRACKING_LIBS) 
 
 #ifdef AIX4
 #define LIBI18N -li18n
@@ -557,8 +557,8 @@
 #endif /* AIX4 */
 
 #ifdef THIS_IS_X11R6
-#ifdef NEED_LIBW
-LIBW= -lw
+#ifdef NEED_TOOLKIT
+LIBW= -llw
 #else
 LIBW=
 #endif

Now, when I reconfigure, & make -llw is not used.  But I get the following
error when linking:

frame-x.o: In function `x_raise_frame_1':
/mnt2/home/jmiller/xemacs-19.15-b6/src/frame-x.c:2039: undefined reference
to `lw_raise_all_pop_up_widgets'
EmacsFrame.o: In function `EmacsFrameRealize':
/mnt2/home/jmiller/xemacs-19.15-b6/src/EmacsFrame.c:322: undefined
reference to `lw_set_keyboard_focus'
make[1]: *** [temacs] Error 1


So is lwlib needed after all?

Jeff

