[Rd] Missing -lm for tcltk (R 1.1.0, AIX 4.3) (PR#573)
Thomas J Vogels
Thomas Vogels <tov@ece.cmu.edu>
19 Jun 2000 14:27:23 -0400
Prof Brian Ripley <ripley@stats.ox.ac.uk> writes:
> > From: tov@phoenix.ece.cmu.edu
> > ok, AIX 4.3 insists on being different. I can't compile --with-tcltk
> > out of the box. I have to add '-lm' to the SHLIBLDFLAGS manually
> > after configure.
>
> Yes, I guess that's because it insists on resolving libm at the shared
> libs build stage.
And the symbols from libm don't make it into R.exp.
> > Which brings up the question: Can you use TK_LIBS instead of TK_XLIBSW
> > during configure? Excerpt from tkConfig.sh on my machine:
> >
> > # Linker switch(es) to use to link with the X11 library archive.
> > TK_XLIBSW='-lX11'
> >
> > # Additional libraries to use when linking Tk.
> > TK_LIBS='-lX11 -lld -lm'
> >
> > The '-lld' wouldn't hurt, would it?
> > Maybe the following would work for configure?
> >
> > case "${host}" in
> > *aix*)
> > LIBS="-ltk${TK_VERSION} ${TCLTK_LIBS} ${TK_LIBS} $LIBS"
> > ;;
> > *)
> > LIBS="-ltk${TK_VERSION} ${TCLTK_LIBS} ${TK_XLIBSW} $LIBS"
> > ;;
> > esac
>
> It's not done like that. Take a look in aclocal.m4. I suspect that
> ${TK_LIBS} would do everywhere, but will need to do some testing.
Ok, aclocal.m4 was obviously new to me. Below is the patch. It
works for me...
With this patch and "SHLIBLD=CC ./configure" I can compile, install,
check R 1.1.
Regards,
-tom
*** aclocal.m4 Mon Jun 19 11:39:56 2000
--- aclocal.m4.orig Mon Jun 19 11:34:21 2000
***************
*** 840,847 ****
if test -n "${TK_CONFIG}"; then
. ${TK_CONFIG} # get TK_VERSION
AC_CHECK_LIB(tk${TK_VERSION}, Tk_Init,
! [ TCLTK_LIBS="${TCLTK_LIBS} -ltk${TK_VERSION} ${TK_LIBS}"
! have_tcltk=yes ], , [${TCLTK_LIBS} ${TK_LIBS}] )
fi
fi
fi
--- 840,847 ----
if test -n "${TK_CONFIG}"; then
. ${TK_CONFIG} # get TK_VERSION
AC_CHECK_LIB(tk${TK_VERSION}, Tk_Init,
! [ TCLTK_LIBS="${TCLTK_LIBS} -ltk${TK_VERSION} ${TK_XLIBSW}"
! have_tcltk=yes ], , [${TCLTK_LIBS} ${TK_XLIBSW}] )
fi
fi
fi
--
mailto:tov@ece.cmu.edu (Tom Vogels) Tel: (412) 268-6638 FAX: -3204
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._