Autoconf test for asm/atomic.h.  Hopefully fixes build probs on RH 7.3.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@367 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/configure.in b/configure.in
index 4782b8c..2fe40f1 100644
--- a/configure.in
+++ b/configure.in
@@ -259,7 +259,7 @@
 
 # Checks for header files.
 AC_HEADER_STDC
-AC_CHECK_HEADERS([fcntl.h malloc.h stdlib.h string.h sys/socket.h sys/statfs.h sys/time.h termios.h unistd.h utime.h])
+AC_CHECK_HEADERS([fcntl.h malloc.h stdlib.h string.h sys/socket.h sys/statfs.h sys/time.h termios.h unistd.h utime.h asm/atomic.h])
 
 # Checks for typedefs, structures, and compiler characteristics.
 AC_TYPE_UID_T
diff --git a/coregrind/vg_unsafe.h b/coregrind/vg_unsafe.h
index 260def9..cd9f3cd 100644
--- a/coregrind/vg_unsafe.h
+++ b/coregrind/vg_unsafe.h
@@ -50,6 +50,9 @@
 #include <linux/sem.h>    /* for struct sembuf */
 
 #include <linux/isdn.h>   /* for ISDN ioctls */
+#ifdef HAVE_ASM_ATOMIC_H
+#include <asm/atomic.h>   /* necessary for module.h */
+#endif
 #include <linux/module.h> /* for struct module */
 #include <scsi/sg.h>      /* for the SG_* ioctls */
 #include <sched.h>        /* for struct sched_param */
diff --git a/vg_unsafe.h b/vg_unsafe.h
index 260def9..cd9f3cd 100644
--- a/vg_unsafe.h
+++ b/vg_unsafe.h
@@ -50,6 +50,9 @@
 #include <linux/sem.h>    /* for struct sembuf */
 
 #include <linux/isdn.h>   /* for ISDN ioctls */
+#ifdef HAVE_ASM_ATOMIC_H
+#include <asm/atomic.h>   /* necessary for module.h */
+#endif
 #include <linux/module.h> /* for struct module */
 #include <scsi/sg.h>      /* for the SG_* ioctls */
 #include <sched.h>        /* for struct sched_param */