infrastructure. Yes, it doesn't do much yet.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2172 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/configure.in b/configure.in
index 7b59f4d..e23608f 100644
--- a/configure.in
+++ b/configure.in
@@ -78,46 +78,55 @@
 esac
 
 AC_MSG_CHECKING([for a supported OS])
+AC_SUBST(VG_PLATFORM)
 
 case "${host_os}" in
-     *linux*) 
+     *linux*)
 	AC_MSG_RESULT([ok (${host_os})])
+        VG_PLATFORM="x86-linux"
+
+        # Ok, this is linux. Check the kernel version
+        AC_MSG_CHECKING([for the kernel version])
+
+        kernel=`uname -r`
+
+        case "${kernel}" in
+             2.6.*) 
+        	    AC_MSG_RESULT([2.6 family (${kernel})])
+        	    AC_DEFINE([KERNEL_2_6], 1, [Define to 1 if you're using Linux 2.6.x])
+        	    ;;
+
+             2.4.*) 
+        	    AC_MSG_RESULT([2.4 family (${kernel})])
+        	    AC_DEFINE([KERNEL_2_4], 1, [Define to 1 if you're using Linux 2.4.x])
+        	    ;;
+
+             2.2.*) 
+        	    AC_MSG_RESULT([2.2 family (${kernel})])
+        	    AC_DEFINE([KERNEL_2_2], 1, [Define to 1 if you're using Linux 2.2.x])
+        	    ;;
+
+             *) 
+        	    AC_MSG_RESULT([unsupported (${kernel})])
+        	    AC_MSG_ERROR([Valgrind works on kernels 2.2, 2.4, 2.6])
+        	    ;;
+        esac
+
+        ;;
+
+     *freebsd*)
+        AC_MSG_RESULT([ok (${host_os})])
+        VG_PLATFORM="x86-freebsd"
+
         ;;
 
      *) 
 	AC_MSG_RESULT([no (${host_os})])
-	AC_MSG_ERROR([Valgrind is Linux specific. Sorry])
+	AC_MSG_ERROR([Valgrind is operating system specific. Sorry. Please consider doing a port.])
 	;;
 esac
 
 
-# Ok, this is linux. Check the kernel version
-AC_MSG_CHECKING([for the kernel version])
-
-kernel=`uname -r`
-
-case "${kernel}" in
-     2.6.*) 
-	    AC_MSG_RESULT([2.6 family (${kernel})])
-	    AC_DEFINE([KERNEL_2_6], 1, [Define to 1 if you're using Linux 2.6.x])
-	    ;;
-
-     2.4.*) 
-	    AC_MSG_RESULT([2.4 family (${kernel})])
-	    AC_DEFINE([KERNEL_2_4], 1, [Define to 1 if you're using Linux 2.4.x])
-	    ;;
-
-     2.2.*) 
-	    AC_MSG_RESULT([2.2 family (${kernel})])
-	    AC_DEFINE([KERNEL_2_2], 1, [Define to 1 if you're using Linux 2.2.x])
-	    ;;
-
-     *) 
-	    AC_MSG_RESULT([unsupported (${kernel})])
-	    AC_MSG_ERROR([Valgrind works on kernels 2.2, 2.4, 2.6])
-	    ;;
-esac
-
 AC_SUBST(DEFAULT_SUPP)
 
 glibc=""
@@ -348,6 +357,9 @@
    include/Makefile 
    auxprogs/Makefile
    coregrind/Makefile 
+   coregrind/arch/Makefile
+   coregrind/arch/x86-linux/Makefile
+   coregrind/arch/x86-freebsd/Makefile
    coregrind/demangle/Makefile 
    coregrind/docs/Makefile
    coregrind/x86/Makefile
diff --git a/coregrind/arch/.cvsignore b/coregrind/arch/.cvsignore
new file mode 100644
index 0000000..3dda729
--- /dev/null
+++ b/coregrind/arch/.cvsignore
@@ -0,0 +1,2 @@
+Makefile.in
+Makefile
diff --git a/coregrind/arch/Makefile.am b/coregrind/arch/Makefile.am
new file mode 100644
index 0000000..629a038
--- /dev/null
+++ b/coregrind/arch/Makefile.am
@@ -0,0 +1,2 @@
+
+SUBDIR=$(VG_PLATFORM)
diff --git a/coregrind/arch/x86-freebsd/.cvsignore b/coregrind/arch/x86-freebsd/.cvsignore
new file mode 100644
index 0000000..3dda729
--- /dev/null
+++ b/coregrind/arch/x86-freebsd/.cvsignore
@@ -0,0 +1,2 @@
+Makefile.in
+Makefile
diff --git a/coregrind/arch/x86-freebsd/Makefile.am b/coregrind/arch/x86-freebsd/Makefile.am
new file mode 100644
index 0000000..139597f
--- /dev/null
+++ b/coregrind/arch/x86-freebsd/Makefile.am
@@ -0,0 +1,2 @@
+
+
diff --git a/coregrind/arch/x86-linux/.cvsignore b/coregrind/arch/x86-linux/.cvsignore
new file mode 100644
index 0000000..3dda729
--- /dev/null
+++ b/coregrind/arch/x86-linux/.cvsignore
@@ -0,0 +1,2 @@
+Makefile.in
+Makefile
diff --git a/coregrind/arch/x86-linux/Makefile.am b/coregrind/arch/x86-linux/Makefile.am
new file mode 100644
index 0000000..139597f
--- /dev/null
+++ b/coregrind/arch/x86-linux/Makefile.am
@@ -0,0 +1,2 @@
+
+