--- Makefile.in.orig	Thu Oct 29 08:18:18 1998
+++ Makefile.in	Thu Oct 29 08:22:34 1998
@@ -15,15 +15,18 @@
 x_ext_lib = @x_ext_lib@
 # Follow the library order used in X11R6 itself:
 #   -lXaw -lXmu -lXt -lSM -lICE -lXext -lX11 (some may not be present).
-x_link = $(www_ldflags) $(x_ldflags) $(x_tool_libs) $(x_pre_libs) $(x_ext_lib) -lX11 $(x_extra_libs)
+x_link = $(LDLIBWWW) $(x_ldflags) $(x_tool_libs) $(x_pre_libs) $(x_ext_lib) -lX11 $(x_extra_libs)
+
+LDLIBWWW=@LDLIBWWW@
+LIBWWWCPPFLAGS=@LIBWWWCPPFLAGS@
+LIBWWWDEP=@LIBWWWDEP@
+LIBWWWDIR = ../../libs/libwww
+LIBWWWSRCDIR = $(srcdir)/../../libs/libwww
 
-www_ldflags=@www_ldflags@
-www_cppflags=@www_cppflags@
-www_dep=@www_dep@
 
 # Extra xdvi-specific compiler options.
 ps_def = @PS_DEF@
-prog_cflags = $(www_cppflags) $(ps_def) $(x_cppflags)
+prog_cflags = $(LIBWWWCPPFLAGS) $(ps_def) $(x_cppflags)
 
 # We don't use alloca ourselves, but the X library might, and this way
 # we avoid buggy versions in -lPW or -lucb.
@@ -39,7 +42,7 @@
 
 default all: $(programs) xdvi.1 
 
-$(program): $(kpathsea) $(objects) $(www_dep)
+$(program): $(kpathsea) $(objects) $(LIBWWWDEP)
 	$(kpathsea_link) $(objects) $(x_link) $(LOADLIBES)
 
 squeeze: squeeze.o
@@ -55,8 +58,8 @@
 	$(SHELL) $(srcdir)/mksedscript $(srcdir) pkpath sizes vfpath \
 	figpath headerpath $(DEFS) $(prog_cflags) >$@
 
-../libwww/libwww.a:
-	cd ../libwww; $(MAKE) $(makeargs) libwww.a
+$(LIBWWWDIR)/libwww.a:
+	cd $(LIBWWWDIR); $(MAKE) $(makeargs) libwww.a
 
 ac_include ../make/tkpathsea.make
 
@@ -94,11 +97,11 @@
 ac_include ../make/clean.make
 
 clean::
-	test -f ../libwww/Makefile && { cd ../libwww; $(MAKE) clean; } || true
+	test -f $(LIBWWWDIR)/Makefile && { cd $(LIBWWWDIR); $(MAKE) clean; } || true
 
 distclean::
 	rm -f psheader.c sedscript xdvi.1 
-	test -f ../libwww/Makefile && { cd ../libwww; $(MAKE) distclean; } || true
+	test -f $(LIBWWWDIR)/Makefile && { cd $(LIBWWWDIR); $(MAKE) distclean; } || true
 
 ac_include ../make/rdepend.make
 ac_include depend.make
--- configure.in.orig	Thu Oct 29 08:18:25 1998
+++ configure.in	Thu Oct 29 08:19:43 1998
@@ -35,79 +35,8 @@
 
 sinclude(../kpathsea/xt.ac)
 sinclude(withenable.ac)
-sinclude(../libwww/withenable.ac)
-
-libwww_include_list="${libwww_include} ${libwww_dir} \
-  ${libwww_dir}/include ${libwww_dir}/Library/src"
-libwww_libdir_list="${libwww_library_dir} ${libwww_dir} ${libwww_dir}/lib \
-  ${libwww_dir}/Library/src"
-
-libwww_include_found=no
-libwww_libdir_found=no
-
-if test $try_system_wwwlib = yes; then
-  for d in $libwww_include_list; do
-    ok=yes
-    for h in $LibWWW_headers; do
-      if test ! -f $d/$h; then
-        ok=no
-        break
-      fi
-    done
-    if test $ok = yes; then
-      libwww_include=$d
-      libwww_include_found=yes
-      break
-    fi
-  done
-fi
-
-if test $libwww_include_found = yes; then
-  www_cppflags="-I${libwww_include} -DHAVE_LIBWWW -DHAVE_WWWLIB_H"
-else
-  www_cppflags="-DHAVE_LIBWWW -DHAVE_WWWLIB_H"
-  if test $try_system_wwwlib = yes; then
-    libwww_include_found=yes
-    AC_CHECK_HEADERS($LibWWW_headers,, libwww_include_found=no; break )
-    :
-  fi
-fi
-
-# only check for libwww.a if the includes could be found
-if test $libwww_include_found = yes; then
-  for d in $libwww_libdir_list; do
-    if test -f $d/libwww.a; then
-      libwww_libdir=$d
-      libwww_libdir_found=yes
-    fi
-  done
-
-  if test ${libwww_libdir_found} = yes; then
-    www_ldflags="-L${libwww_libdir} -lwww"
-    :
-  else
-    www_ldflags=-lwww
-    libwww_libdir_found=yes
-    AC_CHECK_LIB(www, HTParse,, libwww_libdir_found=no)
-    :
-  fi
-fi
-
-if test "${libwww_include_found}" != yes ||
-  test "${libwww_libdir_found}" != yes; then
-  if test $try_system_wwwlib = yes; then
-    AC_MSG_WARN(Have not found standard LIBWWW library. Shall compile my own one.)
-  fi
-  www_ldflags='-L../libwww -lwww'
-  www_cppflags='-I../libwww -I$(srcdir)/../libwww -DHAVE_LIBWWW -DHAVE_WWWLIB_H'
-  www_dep=../libwww/libwww.a
-else
-  www_dep=
-fi
-
-AC_SUBST(www_ldflags)
-AC_SUBST(www_cppflags)
-AC_SUBST(www_dep)
+sinclude(../../libs/libwww/withenable.ac)
+sinclude(../../libs/libwww/libwww.ac)
 
 # For --with-x-toolkit.  Only distinguish `no' from everything else.
 # They don't get to disable X entirely, this is *x*dvi.
