applied patch from Peter Breitenlohner for wget detection and fix of a

* configure.in xstc/Makefile.am: applied patch from Peter Breitenlohner
  for wget detection and fix of a Python path problem, should fix
  #340993
Daniel
diff --git a/ChangeLog b/ChangeLog
index be2cd7a..bb93bd0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Wed Oct 11 10:24:58 CEST 2006 Daniel Veillard <daniel@veillard.com>
+
+	* configure.in xstc/Makefile.am: applied patch from Peter Breitenlohner
+	  for wget detection and fix of a Python path problem, should fix
+	  #340993
+
 Tue Oct 10 22:02:29 CEST 2006 Daniel Veillard <daniel@veillard.com>
 
 	* include/libxml/entities.h entities.c SAX2.c parser.c: trying to
diff --git a/configure.in b/configure.in
index e3439f3..e34c3dd 100644
--- a/configure.in
+++ b/configure.in
@@ -40,6 +40,7 @@
 AC_PATH_PROG(MV, mv, /bin/mv)
 AC_PATH_PROG(TAR, tar, /bin/tar)
 AC_PATH_PROG(PERL, perl, /usr/bin/perl)
+AC_PATH_PROG(WGET, wget, /usr/bin/wget)
 AC_PATH_PROG(XMLLINT, xmllint, /usr/bin/xmllint)
 AC_PATH_PROG(XSLTPROC, xsltproc, /usr/bin/xsltproc)
 
diff --git a/xstc/Makefile.am b/xstc/Makefile.am
index 8b1d1f0..57e1a4a 100644
--- a/xstc/Makefile.am
+++ b/xstc/Makefile.am
@@ -33,20 +33,24 @@
 	   mkdir Tests ; \
 	   fi)
 	-@(if [ ! -f $(TARBALL_2) ] ; then \
+	   if [ -f $(srcdir)/$(TARBALL_2) ] ; then \
+	   $(LN_S) $(srcdir)/$(TARBALL_2) $(TARBALL_2) ; else \
 	   echo "Missing the test suite description (2004-01-14), trying to fetch it" ;\
-	   if [ -x /usr/bin/wget ] ; then \
-	   wget $(TARBALLURL_2) ; \
-	   else echo "Dont' know how to fetch $(TARBALLURL_2)" ; fi ; fi)
+	   if [ -x "$(WGET)" ] ; then \
+	   $(WGET) $(TARBALLURL_2) ; \
+	   else echo "Dont' know how to fetch $(TARBALLURL_2)" ; fi ; fi ; fi)
 	-@(if [ -f $(TARBALL_2) ] ; then \
 	   echo -n "extracting test data (NIST)..." ; \
 	   $(TAR) -xzf $(TARBALL_2) '*/Datatypes' '*/Metadata/$(NISTTESTDEF_2)' ; \
 	   echo "done" ; \
 	   fi)
 	-@(if [ ! -f $(TARBALL) ] ; then \
+	   if [ -f $(srcdir)/$(TARBALL) ] ; then \
+	   $(LN_S) $(srcdir)/$(TARBALL) $(TARBALL) ; else \
 	   echo "Missing the test suite description (2002-01-16), trying to fetch it" ;\
-	   if [ -x /usr/bin/wget ] ; then \
-	   wget $(TARBALLURL) ; \
-	   else echo "Dont' know how to fetch $(TARBALLURL)" ; fi ; fi)
+	   if [ -x "$(WGET)" ] ; then \
+	   $(WGET) $(TARBALLURL) ; \
+	   else echo "Dont' know how to fetch $(TARBALLURL)" ; fi ; fi ; fi)
 	-@(if [ -f $(TARBALL) ] ; then \
 	   echo -n "extracting test data (Sun, Microsoft)..." ; \
 	   $(TAR) -C Tests -xzf $(TARBALL) '*/suntest' '*/msxsdtest' '*/$(MSTESTDEF)' '*/$(SUNTESTDEF)' ; \
@@ -92,21 +96,21 @@
 pytests: $(PYSCRIPTS) $(TESTDIRS)
 	-@(if [ -x nist-test.py -a -d $(TESTDIR)/Datatypes ] ; then 		\
 	   echo "## Running XML Schema tests (NIST)";			\
-	   PYTHONPATH="../python:../python/.libs:..:../libs:$$PYTHONPATH" ;\
+	   PYTHONPATH="../python:../python/.libs:..:../.libs:$$PYTHONPATH" ;\
 	   export PYTHONPATH;						\
 	   LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ;	\
 	   export LD_LIBRARY_PATH;					\
 	   $(CHECKER) $(PYTHON) nist-test.py -s -b $(srcdir) ; fi)
 	-@(if [ -x sun-test.py -a -d $(TESTDIR)/suntest ] ; then 			\
 	   echo "## Running Schema tests (Sun)";				\
-	   PYTHONPATH="../python:../python/.libs:..:../libs:$$PYTHONPATH" ;\
+	   PYTHONPATH="../python:../python/.libs:..:../.libs:$$PYTHONPATH" ;\
 	   export PYTHONPATH;						\
 	   LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ;	\
 	   export LD_LIBRARY_PATH;					\
 	   $(CHECKER) $(PYTHON) sun-test.py -s -b $(srcdir) ; fi)
 	-@(if [ -x ms-test.py -a -d $(TESTDIR)/msxsdtest ] ; then 			\
 	   echo "## Running Schema tests (Microsoft)";			\
-	   PYTHONPATH="../python:../python/.libs:..:../libs:$$PYTHONPATH" ;\
+	   PYTHONPATH="../python:../python/.libs:..:../.libs:$$PYTHONPATH" ;\
 	   export PYTHONPATH;						\
 	   LD_LIBRARY_PATH="$(top_builddir)/.libs:$$LD_LIBRARY_PATH" ;	\
 	   export LD_LIBRARY_PATH;					\