[Rd] rgl: bogus configure[.ac] (PR#14183)

jel+r at cs.uni-magdeburg.de jel+r at cs.uni-magdeburg.de
Tue Jan 12 16:15:12 CET 2010


Full_Name: Jens Elkner
Version: 2.10.1
OS: Solaris
Submission from: (NULL) (141.44.24.14)


The configure.ac is bogus, since it does not include additional library pathes
at the right place and thus fails. E.g.:

$R_HOME/bin/R CMD INSTALL -l $PROTO/R/library \
    --configure-args='--with-gl-includes=/usr/X11/include/NVIDIA
--with-gl-libs=/usr/X11/lib/NVIDIA/amd64' $TMPBUILD

And thus configure tries: cc ... -lGL -L/usr/X11/lib/NVIDIA/amd64
which obviously fails: the path needs to be placed before -l...
So the correct way is to add the path to LD_FLAGS instead of LIBS.

To get the path at the correct place into the to PKG_LIBS limitted Makevars,
one
needs to add the path, when the LIB expansion has been done. Suggested patch:

--- rgl/configure.ac.orig   Mon Feb  2 14:31:24 2009
+++ rgl/configure.ac    Tue Jan 12 06:16:52 2010
@@ -157,9 +157,12 @@
 
 AC_ARG_WITH(gl-libs,
 [  --with-gl-libs=DIR      specify location of OpenGL libs],
-[LIBS="${LIBS} -L${withval}"]
+[LDFLAGS="${LDFLAGS} -L${withval}"
+L_LIB="-L${withval}"
+]
 )
 
+
 AC_ARG_WITH(gl-libname,
 [  --with-gl-libname=NAME  specify Library name (defaults to "GL")], 
 [lGL=${withval}], [lGL=GL]
@@ -179,6 +182,9 @@
 if test "x$this" != xyes; then
   AC_ERROR([missing required library ${lGLU}])
 fi
+if test x$L_LIB != x; then
+   LIBS="${L_LIB} ${LIBS}"
+fi
 
 ## --- FTGL ------------------------------------------------------------------



More information about the R-devel mailing list