[PVFS2-CVS] commit by slang in pvfs2: configure configure.in pvfs2-config.h.in

CVS commit program cvs at parl.clemson.edu
Thu Sep 29 00:23:20 EDT 2005


Update of /projects/cvsroot/pvfs2
In directory parlweb:/tmp/cvs-serv2797

Modified Files:
	configure configure.in pvfs2-config.h.in 
Log Message:
added murali's xattr patches.


Index: configure
===================================================================
RCS file: /projects/cvsroot/pvfs2/configure,v
diff -p -u -r1.244 -r1.245
--- configure	18 Aug 2005 16:33:04 -0000	1.244
+++ configure	29 Sep 2005 03:23:19 -0000	1.245
@@ -4580,6 +4580,131 @@ echo "${ECHO_T}no" >&6
 fi
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
+echo "$as_me:$LINENO: checking for generic_permission api in kernel" >&5
+echo $ECHO_N "checking for generic_permission api in kernel... $ECHO_C" >&6
+CFLAGS="$USR_CFLAGS -I$lk_src/include -I$lk_src/include/asm-i386/mach-generic -I$lk_src/include/asm-i386/mach-default"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+	#define __KERNEL__
+        #include <linux/fs.h>
+	int generic_permission(struct inode *inode)
+        {
+		return 0;
+	}
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GENERIC_PERMISSION 1
+_ACEOF
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+echo "$as_me:$LINENO: checking for generic_getxattr api in kernel" >&5
+echo $ECHO_N "checking for generic_getxattr api in kernel... $ECHO_C" >&6
+CFLAGS="$USR_CFLAGS -I$lk_src/include -I$lk_src/include/asm-i386/mach-generic -I$lk_src/include/asm-i386/mach-default"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+	#define __KERNEL__
+        #include <linux/fs.h>
+			#include <linux/xattr.h>
+	int generic_getxattr(struct inode *inode)
+        {
+		return 0;
+	}
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 { ac_try='test -z "$ac_c_werror_flag"			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GENERIC_GETXATTR 1
+_ACEOF
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
 CFLAGS=$oldcflags
 
 BUILD_ABSOLUTE_TOP=`pwd`

Index: configure.in
===================================================================
RCS file: /projects/cvsroot/pvfs2/configure.in,v
diff -p -u -r1.247 -r1.248
--- configure.in	18 Aug 2005 16:33:05 -0000	1.247
+++ configure.in	29 Sep 2005 03:23:20 -0000	1.248
@@ -525,6 +525,42 @@ AC_TRY_COMPILE([
 	AC_MSG_RESULT(no)
 )
 
+AC_MSG_CHECKING(for generic_permission api in kernel)
+CFLAGS="$USR_CFLAGS -I$lk_src/include -I$lk_src/include/asm-i386/mach-generic -I$lk_src/include/asm-i386/mach-default" 
+dnl if this test passes, the kernel does not have it
+dnl if this test fails, the kernel has it defined with a different signature!
+dnl deliberately, the signature for this method has been changed for it to give a compiler error.
+AC_TRY_COMPILE([
+	#define __KERNEL__
+        #include <linux/fs.h>
+	int generic_permission(struct inode *inode)
+        {
+		return 0;
+	}
+], [],
+	AC_MSG_RESULT(no),
+	AC_MSG_RESULT(yes)
+	AC_DEFINE(HAVE_GENERIC_PERMISSION, 1, Define if kernel has generic_permission),
+)
+
+AC_MSG_CHECKING(for generic_getxattr api in kernel)
+CFLAGS="$USR_CFLAGS -I$lk_src/include -I$lk_src/include/asm-i386/mach-generic -I$lk_src/include/asm-i386/mach-default" 
+dnl if this test passes, the kernel does not have it
+dnl if this test fails, the kernel has it defined
+AC_TRY_COMPILE([
+	#define __KERNEL__
+        #include <linux/fs.h>
+			#include <linux/xattr.h>
+	int generic_getxattr(struct inode *inode)
+        {
+		return 0;
+	}
+], [],
+	AC_MSG_RESULT(no),
+	AC_MSG_RESULT(yes)
+	AC_DEFINE(HAVE_GENERIC_GETXATTR, 1, Define if kernel has generic_getxattr),
+)
+
 CFLAGS=$oldcflags
 
 dnl PAV configuration needs absolute location of source and build.

Index: pvfs2-config.h.in
===================================================================
RCS file: /projects/cvsroot/pvfs2/pvfs2-config.h.in,v
diff -p -u -r1.50 -r1.51
--- pvfs2-config.h.in	18 Aug 2005 16:33:05 -0000	1.50
+++ pvfs2-config.h.in	29 Sep 2005 03:23:20 -0000	1.51
@@ -28,6 +28,12 @@
 /* Define to 1 if you have the <execinfo.h> header file. */
 #undef HAVE_EXECINFO_H
 
+/* Define if kernel has generic_getxattr */
+#undef HAVE_GENERIC_GETXATTR
+
+/* Define if kernel has generic_permission */
+#undef HAVE_GENERIC_PERMISSION
+
 /* Define if gethostbyaddr function exists */
 #undef HAVE_GETHOSTBYADDR
 



More information about the PVFS2-CVS mailing list