Peculiar configure behavior

Randy Chung aoshi at OCF.Berkeley.EDU
Sat Aug 7 19:41:05 CEST 2004

-R is one of the options you can pass in via LDFLAGS, which specifies 
run-time libraries to use (before the default path).  It's helpful 
sibling flag (also in LDFLAGS) is -L, which also comes before the 
default path, and specifies which libraries to link against during 
compilation.  Similar flags include the -I from the CPPFLAGS environment 
variable, which specifies headers.  For the pedants on the list, they 
actually specify the path, but you know what I mean :)

If you look at a line that running make outputs (e.g. the following, 
from running make in the xfrun dir), you'll see that -R shows up in the 
bash script which invokes libtool, which passes what's included via -R, 
following a -Wl switch (which you mention):

/bin/sh ../libtool --mode=link gcc  -g -O2  -L/usr/local/xfce4/lib 
-R/usr/local/xfce4/lib -o xfrun4  xfrun4-xfrun.o -Wl,--export-dynamic 
-L/usr/X11R6/lib -L/usr/local/xfce4/lib -lxfcegui4 -lgtk-x11-2.0 
-lxfce4util -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 
-lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 
-Wl,-R/usr/lib -ldbh -lm

(particularly, see -R/usr/lib towards the end)

Said flags are also passed to gcc through the good graces of gcc, e.g. 
below (same dir, same make):

gcc -g -O2 -o xfrun4 xfrun4-xfrun.o -Wl,--export-dynamic -Wl,-R/usr/lib 
  -L/usr/local/xfce4/lib -L/usr/X11R6/lib 
/usr/local/xfce4/lib/ /usr/lib/ 
/usr/local/xfce4/lib/ /usr/lib/ 
/usr/lib/ /usr/lib/ 
/usr/lib/ /usr/lib/ 
/usr/lib/ /usr/lib/ 
/usr/lib/ -ldl /usr/lib/ 
/usr/lib/ -lm -Wl,--rpath -Wl,/usr/local/xfce4/lib -Wl,--rpath 

(also note that -R/usr/lib is again passed to gcc, only at the beginning 
this time)



Brian J. Tarricone wrote:
> what is the -R option?  according to the gcc manpage, it doesn't exist.  
> ditto for libtool.  perhaps you're thinking of the -rpath option (which 
> is actually a linker option, and needs to be passed to gcc using -Wl).
> 	-brian

More information about the Xfce4-dev mailing list