--- ./src/config.h.in Fri May 17 23:05:14 2002 +++ ../wget-1.8.2/./src/config.h.in Sun Jun 9 13:39:14 2002 @@ -223,6 +223,9 @@ /* Define if you wish to compile with socks support. */ #undef HAVE_SOCKS +/* Define if you wish to compile with socks support. */ +#undef HAVE_SOCKS5 + /* Define to 1 if ANSI function prototypes are usable. */ #undef PROTOTYPES --- ./src/main.c Fri May 17 23:05:19 2002 +++ ../wget-1.8.2/./src/main.c Sun Jun 9 13:39:41 2002 @@ -341,6 +341,10 @@ { 0, 0, 0, 0 } }; +#ifdef HAVE_SOCKS5 + SOCKSinit(argv[0]); +#endif + i18n_initialize (); append_to_log = 0; --- ./src/Makefile.in Fri May 17 23:05:13 2002 +++ ../wget-1.8.2/./src/Makefile.in Sun Jun 9 13:39:58 2002 @@ -59,7 +59,7 @@ INCLUDES = -I. -I$(srcdir) @SSL_INCLUDES@ COMPILE = $(CC) $(INCLUDES) $(CPPFLAGS) $(DEFS) $(CFLAGS) -LINK = @LIBTOOL@ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ +LINK = @LIBTOOL@ --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ RM = rm -f --- ./src/wget.h Fri May 17 23:14:49 2002 +++ ../wget-1.8.2/./src/wget.h Sun Jun 9 13:40:14 2002 @@ -334,4 +334,11 @@ retrieve the requisites of a single document. */ #define INFINITE_RECURSION -1 +#include "config.h" +#ifdef HAVE_SOCKS5 +# define SOCKS +# define INCLUDE_PROTOTYPES +# include +#endif + #endif /* WGET_H */ --- ./configure.in Fri May 17 23:05:11 2002 +++ ../wget-1.8.2/./configure.in Sun Jun 9 13:41:09 2002 @@ -55,6 +55,10 @@ [ --with-socks use the socks library], [AC_DEFINE(HAVE_SOCKS)]) +AC_ARG_WITH(socks5, +[ --with-socks5 use the socks5 library], +[AC_DEFINE(HAVE_SOCKS5)]) + AC_ARG_WITH(ssl, [ --with-ssl[=SSL-ROOT] link with SSL support [default=auto] --without-ssl disable SSL autodetection]) @@ -226,6 +230,11 @@ AC_CHECK_LIB(socks, Rconnect) fi +if test "x${with_socks5}" = xyes +then + AC_CHECK_LIB(socks5, SOCKSconnect) +fi + dnl $with_ssl can be one of: dnl - empty string or "auto", meaning autodetect SSL and use it if found. dnl - "yes", meaning link with SSL or bail out. @@ -273,7 +282,7 @@ dnl Use libtool for OpenSSL tests so we can specify "-R" dnl without having to know how the linker handles it. - CC="$SHELL ./libtool $CC" + CC="$SHELL ./libtool --mode=link $CC" dnl Unfortunately, as of this writing (OpenSSL 0.9.6), the libcrypto dnl shared library doesn't record its dependency on libdl, so we --- ./configure Tue May 28 16:03:15 2002 +++ ../wget-1.8.2/./configure Sun Jun 9 13:43:06 2002 @@ -14,6 +14,8 @@ ac_help="$ac_help --with-socks use the socks library" ac_help="$ac_help + --with-socks5 use the socks5 library" +ac_help="$ac_help --with-ssl[=SSL-ROOT] link with SSL support [default=auto] --without-ssl disable SSL autodetection" ac_help="$ac_help @@ -775,6 +777,16 @@ fi +# Check whether --with-socks5 or --without-socks5 was given. +if test "${with_socks5+set}" = set; then + withval="$with_socks5" + cat >> confdefs.h <<\EOF +#define HAVE_SOCKS5 1 +EOF + +fi + + # Check whether --with-ssl or --without-ssl was given. if test "${with_ssl+set}" = set; then withval="$with_ssl" @@ -7154,6 +7166,58 @@ fi +if test "x${with_socks5}" = xyes +then + echo $ac_n "checking for SOCKSconnect in -lsocks5""... $ac_c" 1>&6 +echo "configure:3502: checking for SOCKSconnect in -lsocks5" >&5 +ac_lib_var=`echo socks5'_'SOCKSconnect | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lsocks5 $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo socks5 | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi + +fi + + if test x"$with_ssl" = x; then with_ssl=auto fi @@ -7178,7 +7242,7 @@ wget_save_LDFLAGS=$LDFLAGS wget_save_CPPFLAGS=$CPPFLAGS - CC="$SHELL ./libtool $CC" + CC="$SHELL ./libtool --mode=link $CC" echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 echo "configure:7185: checking for dlopen in -ldl" >&5