Re: wget 1.7, linux, -rpath

2001-06-07 Thread karl

Replacing -rpath  with -Wl,rpath  

It has to be -Wl,-rpath, not -Wl,rpath (with the - on rpath too).

All I can say is that after I made that change, the ssl test worked for
me on redhat 7.1 (and so did the ssl functionality :).  I can see how
your other changes might be needed in other cases, though.

On another topic, you might consider upgrading to autoconf 2.50.  It has
a number of nice new features, and at least for me (i.e., Texinfo), the
upgrade was pretty much painless.

Thanks,
karl



Re: wget 1.7, linux, -rpath

2001-06-06 Thread Jan Prikryl

Quoting [EMAIL PROTECTED] ([EMAIL PROTECTED]):

 The ssl support is much appreciated in wget 1.7.  But there is a problem
 with the configure support that makes it think ssl can't be used, at
 least with gcc 2.95.2 on my redhat 6.2 system:

Thanks for the report. Unfortunately the SSL test does not work on
linux at all. Replacing -rpath  with -Wl,rpath  will solve part of
the problems. You may want to try if the attached patch works for
you. Note that this is an unofficial patch and while it may help
solving the SSL check problem, it may break other things.

-- jan

+--
 Jan Prikryl| vr|vis center for virtual reality and visualisation
 [EMAIL PROTECTED] | http://www.vrvis.at
+--


Index: configure.in
===
RCS file: /pack/anoncvs/wget/configure.in,v
retrieving revision 1.17
diff -u -r1.17 configure.in
--- configure.in2001/05/28 22:02:47 1.17
+++ configure.in2001/06/06 05:26:20
@@ -174,8 +174,12 @@
 AC_CHECK_FUNCS(strdup strstr strcasecmp strncasecmp)
 AC_CHECK_FUNCS(gettimeofday mktime strptime)
 AC_CHECK_FUNCS(strerror snprintf vsnprintf select signal symlink access isatty)
-AC_CHECK_FUNCS(uname gethostname)
+AC_CHECK_FUNCS(uname)
 
+AC_CHECK_FUNCS(gethostname, [], [
+  AC_CHECK_LIB(nsl, gethostname)
+])
+
 AC_CHECK_FUNCS(gethostbyname, [], [
   AC_CHECK_LIB(nsl, gethostbyname)
 ])
@@ -205,14 +209,18 @@
 AC_MSG_CHECKING(for runtime libraries flag)
 case $host_os in
   sol2 ) dash_r=-R ;;
-  decosf* | linux* | irix*) dash_r=-rpath  ;;
+  decosf* | irix*) dash_r=-rpath  ;;
+  linux*) dash_r=-Wl,rpath  ;;
   *)
 dash_r=
 for try_dash_r in -R -R  -rpath ; do
   OLD_LDFLAGS=$LDFLAGS
   LDFLAGS=${try_dash_r}/no/such/file-or-directory $LDFLAGS
+  dnl gcc seems to only produce a warning about nonexistent option
+  dnl `-R/no/such/file-or-directory' so the test comes thru
+  dnl (tested with gcc version 3.0 20010308 (prerelease))
   AC_TRY_LINK(, , dash_r=$try_dash_r)
-  LDFLAGS=$ODL_LDFLAGS
+  LDFLAGS=$OLD_LDFLAGS
   test -n $dash_r  break
 done ;;
 esac
@@ -235,9 +243,6 @@
 ssl_all_roots=$with_ssl
   fi
 
-  OLD_LIBS=$LIBS
-  OLD_LDFLAGS=$LDFLAGS
-
   dnl Unfortunately, as of this writing (OpenSSL 0.9.6), the libcrypto
   dnl shared library doesn't record its dependency on libdl, so we
   dnl need to check for it ourselves so we won't fail to link due to a
@@ -245,6 +250,9 @@
   dnl shl_load().
   AC_CHECK_LIB(dl,dlopen)
   AC_CHECK_LIB(dl,shl_load)
+
+  OLD_LIBS=$LIBS
+  OLD_LDFLAGS=$LDFLAGS
 
   ssl_linked=no