Application Developer Guide > Interapplication Communication for UNIX > libXm modifications
  

libXm modifications
After downloading the library source, make the following changes to the source code:
 
note
These changes are the same on both Linux and Mac OS X.
The Motif source tarball included with PV-WAVE Linux installations already contains these modifications
*Modify the file ToolTip.c in the motif-2.3.6/lib/Xm directory:
a. Open the file in an editor.
b. Locate the routine _XmToolTipEnter() around line 220.
c. Add a return statement before the first line of executable code in the routine:
void
_XmToolTipEnter (Widget wid,
                 XEvent * event,
                 String * params,
                 Cardinal * num_params)
{
   XmToolTipConfigTrait ttp;           /* ToolTip pointer */
   return;   /* return statement added here */ 
   ttp = ToolTipGetData (wid);  
 
d. Next, locate the routine _XmToolTipLeave around line 265.
e. Add a return statement before the first line of executable code in the routine:
void
_XmToolTipLeave (Widget w,
                 XEvent * event,
                 String * params,
                 Cardinal * num_params)
{
   return; /* return statement added here */ 
   XmToolTipConfigTrait ttp = ToolTipGetData (w);
These changes bypass the pop-up tool tip functionality in the library, disabling the appearance of help text when the mouse hovers over a widget. Instabilities in the code and data structures it uses require this change.
*Modify the file XmI.h in the motif-2.3.6/lib/Xm directory:
a. Locate the statement, #define FIX_1565, around line 297.
b. Comment it out:
   /* #define FIX_1565 */
Building the libraries for PV-WAVE
Before you can build, you first need to configure the library for your machine using the correct build and link flags. Below are the commands we use to configure and build Motif for PV-WAVE on our Linux machines in a C shell using the Oracle Solaris Studio 12.4 C compiler and 64-bit PV-WAVE on a Mac OS X machine using the Clang compiler:
 
note
If you are using a non-Solaris compiler linker, you need to install the full Oracle Solaris Compiler and add the following:
# ./solarisstudio.sh --non-interactive --installation-location <install_dir>
 
Developer Studio 12.5:
64bit - <install_dir>/developerstudio12.5/lib/compilers/amd64/libc_supp.a
32bit - <install_dir>/developerstudio12.5/lib/compilers/libc_supp.a
 
Solaris Studio 12.4:
64bit - <install_dir>/solarisstudio12.4/lib/compilers/amd64/libc_supp.a
32bit - <install_dir>/solarisstudio12.4/lib/compilers/libc_supp.a
32-bit PV-WAVE on Linux:
In the motif-2.3.6 directory:
setenv CC /opt/oracle/solarisstudio12.4/bin/cc
setenv CXX /opt/oracle/solarisstudio12.4/bin/CC
setenv CXXFLAGS " -xO2 -m32"
setenv CFLAGS "-xO2 -m32  -xcode=pic32"
setenv LDFLAGS " -xO2 -m32 -xcode=pic32 -L/usr/lib -lfontconfig"
setenv LD $CC
 
./configure --prefix=/usr --disable-jpeg --disable-png
 
make
 
cp ./lib/Xm/.libs/libXm.a <RW_DIR>/wave/bin/bin.linux/libXm/libXm.a.2.3.6
 
Note
You need to modify paths to match your system.
64-bit PV-WAVE on Linux:
In the motif-2.3.6 directory:
setenv CC /opt/oracle/solarisstudio12.4/bin/cc
setenv CXX /opt/oracle/solarisstudio12.4/bin/CC
setenv CXXFLAGS " -xO2 -m64"
setenv CFLAGS "-xO2 -m64 -xcode=pic32"
setenv LDFLAGS " -xO2 -m64 -xcode=pic32 -L/usr/lib64 -lfontconfig"
setenv LD $CC
 
./configure --prefix=/usr --disable-jpeg --disable-png
 
make
 
cp ./lib/Xm/.libs/libXm.a <RW_DIR>/wave/bin/bin.linux64/libXm/libXm.a.2.3.6
 
Note
You need to modify paths to match your system.
Mac OS X:
In the motif-2.3.6 directory:
setenv CC /usr/bin/clang
setenv CXX /usr/bin/clang
setenv CXXFLAGS " -m64 -fPIC -w -I/usr/X11R6/include -I/usr/local/include/freetype2"
setenv CFLAGS " -m64 -fPIC -w -I/usr/X11R6/include -I/usr/local/include/freetype2"
setenv LDFLAGS " -m64 -fPIC -L/usr/lib -lfontconfig -w"
setenv LD $CC
./configure --prefix=/usr --disable-jpeg --disable-png
make
cp ./lib/Xm/.libs/libXm.a ../../wave/bin/bin.macosx64/xmlib/libXm.a.2.3.6
Optional Tools
When building the library, you may find that some of the optional tools do not build properly and the build stops at that point. This is not a problem since the library PV-WAVE needs is already built before that stage.
However, if you wish to build all of the optional tools, do the following:
1. Open the file /motif-2.3.6/tools/wml/wmluiltok.l.
2. Add a blank line at the very top of the file and type:
%option main
This should allow the optional tools to build properly. These tools are not needed by PV-WAVE.
 

Version 2017.0
Copyright © 2017, Rogue Wave Software, Inc. All Rights Reserved.