On 25 May 2001, Hrvoje Niksic wrote:
> > Ah yes, I understand. Due to SSL shared libs being placed in weird
> > places, they cannot always be located by the dynamic linker.
>
> Even worse -- the dynamic linker doesn't find them even when they're
> in the *standard* (default) places such as /usr/local/lib.
It isn't a standard place, unfortunately, at least according to the SVR4
ABI, which ELF dynamic linkers usually conform to.
> > Note that adding RPATH for a cross-compiled program would usually be
> > bogus anyway
>
> Fully agreed. In fact, you will notice that the loop first tries to
> be civil and play by the rules. If that fails, and it *does* fail on
Yep, I see and it's fine for me as I tend to place libs into /usr/lib.
> Solaris, then it goes to look in special directories. Your
> cross-compiling hack could simply convince AC_TRY_RUN that everything
> is fine.
Since after studying the script I see that the AC_TRY_RUN test is just a
yes/no choice, this is actually the approach I've taken -- an AC_CACHE_VAL
invocation would simply be an overkill with no real benefit. It would be
nice to place the RPATH test under AC_CACHE_VAL, OTOH, but it's not a
necessity.
I'm wondering if the RPATH test is needed at all. Libtool knows how to
hardcode paths into libraries for a number of operating systems and
presents a consistent interface. Couldn't we use it?
> Thanks. If you understand how the caching thing works, could you
> please take a look at this... I am calling AC_CHECK_LIB in a loop,
> but caching breaks that. So what I do is manually unset the caching
> variables. This is dirty, but it "works".
You would have to write an own enhanced version of AC_CHECK_LIB making
use of AC_TRY_LINK_FUNC or AC_TRY_LINK which are more general and do not
do caching themselves. Unsetting variables is probably the simplest way
in this case, though.
> Is there a nicer way to temporarily disable caching?
None that I know of, even for autoconf 2.50.
Here are two patches I created working on wget over the weekend. I have
a few others available, as well: a libtool 1.4 update and fixes for
autoconf 2.50. I think the libtool update is worth considering now (1.3.5
has a few nasty cross-compiling bugs) and autoconf fixes would be a
post-1.7 item. Do you want to see these changes as well?
2001-05-28 Maciej W. Rozycki <[EMAIL PROTECTED]>
* configure.in: Don't fail the runtime linking test when
cross-compiling.
* configure.in: Use $host_os and not $opsys to denote the host OS.
Maciej
--
+ Maciej W. Rozycki, Technical University of Gdansk, Poland +
+--------------------------------------------------------------+
+ e-mail: [EMAIL PROTECTED], PGP key available +
wget-1.7-dev-20010525-ssl-cross.patch
diff -up --recursive --new-file wget.macro/configure.in wget/configure.in
--- wget.macro/configure.in Fri May 25 00:23:22 2001
+++ wget/configure.in Sat May 26 17:10:02 2001
@@ -295,8 +295,10 @@ if test x"$with_ssl" != x -a x"$with_ssl
AC_TRY_RUN([
char RSA_new();
char SSL_new();
-main(){return 0;}
-], AC_MSG_RESULT("yes"), AC_MSG_RESULT("no"); ssl_link_failure=yes)
+main(){return 0;}],
+ AC_MSG_RESULT("yes"),
+ AC_MSG_RESULT("no"); ssl_link_failure=yes,
+ AC_MSG_RESULT("cross"))
fi
if test x"$ssl_link_failure" = xno; then
wget-1.7-dev-20010525-host_os.patch
diff -up --recursive --new-file wget.macro/configure.in wget/configure.in
--- wget.macro/configure.in Fri May 25 00:23:22 2001
+++ wget/configure.in Sat May 26 18:52:40 2001
@@ -203,7 +203,7 @@ dnl merely for the configure test below.
dnl performed by libtool. Wouldn't it be nice if libtool also
dnl provided "querying" that we need in configure?
AC_MSG_CHECKING("for runtime libraries flag")
-case "$opsys" in
+case "$host_os" in
sol2 ) dash_r="-R" ;;
decosf* | linux* | irix*) dash_r="-rpath " ;;
*)