Removed unused junk:
- tests for header files that are never utilised
- stupid long and bogus X version test that we ignored anyway


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2886 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/configure.in b/configure.in
index 2bcb4e0..25beccb 100644
--- a/configure.in
+++ b/configure.in
@@ -198,7 +198,6 @@
 ],
 glibc="2.3")
 
-# Ok, this is linux. Check the kernel version
 AC_MSG_CHECKING([the glibc version])
 
 case "${glibc}" in
@@ -241,85 +240,14 @@
 AC_DEFINE([HAVE_SCHED_PRIORITY], 1, [pthread / sched_priority exists])
 fi
 
-# try to detect the XFree version
-# JRS 2002-06-17: this is completely bogus because it
-# detects the server version, whereas we need to know the 
-# client library version.  So what follows is hacked to
-# use all the X supp files regardless of what is detected.
-# This is really stoooopid and should be fixed properly.
-
+# We don't know how to detect the X client library version
+# (detecting the server version is easy, bu no help).  So we
+# just use a hack: always include the suppressions for both
+# versions 3 and 4.
 AC_PATH_X
-
 if test "${no_x}" != 'yes' ; then
-
-   AC_MSG_CHECKING([X version])
-
-   cat<<EOF > conftest.c
-#include <X11/Xlib.h>
-
-int main (int argc, char * argv [])
-{
-  Display * display = XOpenDisplay (NULL);
-
-  if (display) {
-    printf ("%s version=%d\n", ServerVendor (display), VendorRelease (display));
-  }
-
-  return 0;
-}
-EOF
-
-   ${CC} -o conftest conftest.c -I${x_includes} -L${x_libraries} -lX11 >&5 2>&1
-
-   if test "$?" != 0 ; then
-     AC_MSG_RESULT([cannot compile test program])
-   else
-     xfree=`./conftest`
-
-     case "${xfree}" in
-	*XFree86*) 
-	   case "${xfree}" in
-	      *version=4*) 
-		 AC_MSG_RESULT([XFree 4.x family])
-		 AC_DEFINE([XFREE_4], 1, [Define to 1 if you're using XFree 4.x])
-		 DEFAULT_SUPP="${DEFAULT_SUPP} xfree-4.supp"
-		 # haaaaaaack!
-		 DEFAULT_SUPP="${DEFAULT_SUPP} xfree-3.supp"
-		 ;;
-
-	      *version=3*) 
-		 AC_MSG_RESULT([XFree 3.x family])
-		 AC_DEFINE([XFREE_3], 1, [Define to 1 if you're using XFree86 3.x])
-		 DEFAULT_SUPP="${DEFAULT_SUPP} xfree-3.supp"
-		 # haaaaaaack!
-		 DEFAULT_SUPP="${DEFAULT_SUPP} xfree-4.supp"
-		 ;;
-
-	      *) AC_MSG_RESULT([unknown XFree86 server (${xfree})])
-		 # haaaaaaack!
-		 DEFAULT_SUPP="${DEFAULT_SUPP} xfree-3.supp"
-		 DEFAULT_SUPP="${DEFAULT_SUPP} xfree-4.supp"
-		 ;;
-	   esac
-	   ;;
-        *X.Org*)
-	   case "${xfree}" in
-	      *version=6*) 
-		 AC_MSG_RESULT([X.Org 6.x family])
-		 AC_DEFINE([XFREE_4], 1, [Define to 1 if you're using XFree 4.x])
-		 DEFAULT_SUPP="${DEFAULT_SUPP} xfree-4.supp"
-		 # haaaaaaack!
-		 DEFAULT_SUPP="${DEFAULT_SUPP} xfree-3.supp"
-		 ;;
-	   esac
-	   ;;
-	*) AC_MSG_RESULT([not a XFree86 server])
-	   ;;
-     esac
-
-   fi
-
-   rm -f conftest conftest.c
+   DEFAULT_SUPP="${DEFAULT_SUPP} xfree-4.supp"
+   DEFAULT_SUPP="${DEFAULT_SUPP} xfree-3.supp"
 fi
 
 
@@ -330,9 +258,7 @@
 CFLAGS="-mpreferred-stack-boundary=2"
 
 AC_TRY_COMPILE(, [
-
 int main () { return 0 ; }
-
 ],
 [
 PREFERRED_STACK_BOUNDARY="-mpreferred-stack-boundary=2"
@@ -366,7 +292,7 @@
 
 # Checks for header files.
 AC_HEADER_STDC
-AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/socket.h sys/statfs.h sys/time.h sys/endian.h endian.h termios.h unistd.h utime.h mqueue.h])
+AC_CHECK_HEADERS([sys/endian.h endian.h mqueue.h])
 
 # Checks for typedefs, structures, and compiler characteristics.
 AC_TYPE_UID_T