stolcke@icsib2.Berkeley.EDU (Andreas Stolcke) (10/05/89)
I had no trouble building XView and the sample applications (on a Sun4, SunOS4.0.3), and I it all works quite nicely, BUT: I was truely shocked to be left with a 1MB binary for each of cmdtool, clock, and textedit. That's not a very convenient size for a `tool', I thought, and went on to build a shared version of libxvin and libxvol. After some experimentation I succeeded by changing just a bit of the XView.config file (patch included below). After sharefying the Xlib in a similar way (BTW, thanks to the author of an earlier posting on this issue) I ended up with a cmdtool and textedit which have *exactly* the same size as their SunView counterparts! Also, the shared Xlib brought down the size of olwm from 300k to 100k. Now, I sincerely don't know how Sun wants XView to work on systems without shared libs (just considering disk space, that is). I'd like to know about other people's experiences in this matter. *** XView.config.dist Thu Aug 17 22:23:07 1989 --- XView.config Tue Oct 3 13:42:31 1989 *************** *** 17,36 **** /**/# in the standard place (within the X11 source tree), define their /**/# locations as MKFONTDIR and FC, respectively. /**/# DEC3100 Config options #ifdef ultrix INSTALL=/usr/bin/install #endif ! LIBRARY_DEST=/home/xview2/usr/lib ! HEADER_DEST=/home/xview2/usr/include TOOLDIR=../../../usr.bin/tools ! MKFONTDIR=/usr/bin/mkfontdir ! FC=/usr/bin/bdftosnf FCFLAGS= ! CDEBUGFLAGS=-DPRE_R4_ICCCM ! FONTINSTDIR=/usr/lib/X11/fonts/xview RANLIBINSTFLAGS= AR=ar clq --- 17,48 ---- /**/# in the standard place (within the X11 source tree), define their /**/# locations as MKFONTDIR and FC, respectively. + /**/# define Version to be the version number of the shared libraries + /**/# undefine to use static libraries + #define Version 1.0 + /**/# DEC3100 Config options #ifdef ultrix INSTALL=/usr/bin/install #endif ! LIBRARY_DEST=$(USRLIBDIR) ! HEADER_DEST=$(USRLIBDIR) ! ! DEMO_DEST=/tmp ! HELP_DEST=$(USRLIBDIR)/help ! TOOLDIR=../../../usr.bin/tools ! MKFONTDIR=$(BINDIR)/mkfontdir ! FC=$(BINDIR)/bdftosnf FCFLAGS= ! #if defined(Version) & SunOSPlatform & (OSMajorVersion == 4) ! CDEBUGFLAGS=-pic -O -DPRE_R4_ICCCM ! #else ! CDEBUGFLAGS=-O -DPRE_R4_ICCCM ! #endif ! FONTINSTDIR=$(FONTDIR)/xview RANLIBINSTFLAGS= AR=ar clq *************** *** 77,83 **** --- 89,109 ---- /* * Install a library without first trying to build it */ + #if defined(Version) & SunOSPlatform & (OSMajorVersion == 4) #define InstallLibraryNoBuild(libname,dest) @@\ install:: @@\ + -if test libname = xview ;\ @@\ + then \ @@\ + $(LD) -assert pure-text -o lib/**/libname.so.Version \ @@\ + libxv*$(PATHSEP)*$(PATHSEP)*.o ;\ @@\ + else \ @@\ + $(LD) -assert pure-text -o lib/**/libname.so.Version \ @@\ + *$(PATHSEP)*.o ;\ @@\ + fi @@\ + -$(INSTALL) -c $(INSTLIBFLAGS) lib/**/libname.so.Version dest + #else + #define InstallLibraryNoBuild(libname,dest) @@\ + install:: @@\ -$(INSTALL) -c $(INSTLIBFLAGS) lib/**/libname.a dest @@\ -$(RANLIB) $(RANLIBINSTFLAGS) dest/lib/**/libname.a + #endif ---- Andreas Stolcke International Computer Science Institute stolcke@icsi.Berkeley.EDU 1957 Center St., Suite 600, Berkeley, CA 94704 (415) 642-4274 ext. 126