From 27b6961062f1cc0f70b57adab0765d7cb9bae221 Mon Sep 17 00:00:00 2001
From: jacob <jacob>
Date: Mon, 13 Dec 2004 23:38:58 +0000
Subject: [PATCH]  - add missing files to EXTRA_DIST  - change fshooks tests to
 work on HEAD (and better in general)  - fix init script tests

---
 build/autoMakefile.am                | 11 ++++--
 build/autoMakefile.am.toplevel       |  2 +
 build/autoconf/.cvsignore            |  2 +
 build/autoconf/Makefile.am           |  2 +-
 build/autoconf/lustre-build-linux.m4 | 59 ++++++----------------------
 build/autoconf/lustre-build.m4       |  5 ++-
 6 files changed, 28 insertions(+), 53 deletions(-)
 create mode 100644 build/autoconf/.cvsignore

diff --git a/build/autoMakefile.am b/build/autoMakefile.am
index 2802978f8f..95994a4bd3 100644
--- a/build/autoMakefile.am
+++ b/build/autoMakefile.am
@@ -1,5 +1,8 @@
-EXTRA_DIST := Makefile lbuild linux-merge-config.awk	  \
-	linux-merge-modules.awk linux-rhconfig.h lmake	  \
-	lustre-kernel-2.4.spec.in lustre.spec lustre.spec \
-	suse-functions.sh suse-post.sh suse-postun.sh	  \
+EXTRA_DIST := Makefile Makefile.in.toplevel autoMakefile.am.toplevel	\
+	lbuild linux-merge-config.awk					\
+	linux-merge-modules.awk linux-rhconfig.h lmake			\
+	lustre-kernel-2.4.spec.in lustre.spec lustre.spec		\
+	suse-functions.sh suse-post.sh suse-postun.sh			\
 	suse-trigger-script.sh.in
+
+SUBDIRS := autoconf
diff --git a/build/autoMakefile.am.toplevel b/build/autoMakefile.am.toplevel
index 7d984cea40..7bb6337041 100644
--- a/build/autoMakefile.am.toplevel
+++ b/build/autoMakefile.am.toplevel
@@ -1,6 +1,8 @@
 SUBDIRS := . build @LIBSYSIO_SUBDIR@ portals lustre
 DIST_SUBDIRS := build @LIBSYSIO_SUBDIR@ portals lustre
 
+EXTRA_DIST := config.h.in
+
 # these empty rules are needed so that automake doesn't add its own
 # recursive rules
 etags-recursive:
diff --git a/build/autoconf/.cvsignore b/build/autoconf/.cvsignore
new file mode 100644
index 0000000000..282522db03
--- /dev/null
+++ b/build/autoconf/.cvsignore
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff --git a/build/autoconf/Makefile.am b/build/autoconf/Makefile.am
index d3fd6c49c0..23729e73e6 100644
--- a/build/autoconf/Makefile.am
+++ b/build/autoconf/Makefile.am
@@ -1,2 +1,2 @@
-EXTRA_DIST := lustre-build.mv lustre-build-darwin.mv lustre-build-linux.m4
+EXTRA_DIST := lustre-build.m4 lustre-build-darwin.m4 lustre-build-linux.m4
 
diff --git a/build/autoconf/lustre-build-linux.m4 b/build/autoconf/lustre-build-linux.m4
index 301babdf1c..a2dd4a0ca5 100644
--- a/build/autoconf/lustre-build-linux.m4
+++ b/build/autoconf/lustre-build-linux.m4
@@ -1,26 +1,3 @@
-#
-# LB_LINUX_INKERNEL
-#
-# in kernel compilation? (2.5 only)
-#
-AC_DEFUN([LB_LINUX_INKERNEL],
-[AC_MSG_CHECKING([if inkernel build support is requested])
-AC_ARG_ENABLE([inkernel],
-	AC_HELP_STRING([--enable-inkernel],
-		       [set up 2.5 kernel makefiles]),
-	[],[enable_inkernel=no])
-AC_MSG_RESULT([$enable_inkernel])
-
-if test x$enable_inkernel = xyes ; then
-        echo ln -s `pwd` $LINUX/fs/lustre
-        rm $LINUX/fs/lustre
-       	ln -s `pwd` $LINUX/fs/lustre
-	find portals lustre -name Makefile.mk | sed 's/.mk$//' | xargs -n 1 \
-		sh -e -x -c '(cp -f $0.mk $0.in)'
-fi
-])
-
-
 #
 # LB_LINUX_VERSION
 #
@@ -40,8 +17,6 @@ AC_MSG_RESULT([$linux25])
 
 MODULE_TARGET="SUBDIRS"
 if test $linux25 = "yes" ; then
-	LB_CONFIG_INKERNEL
-
 	makerule="$PWD/build"
 	AC_MSG_CHECKING([for external module build support])
 	rm -f build/conftest.i
@@ -461,30 +436,20 @@ LB_LINUX_CONFIG([EXT3_FS_XATTR],[$1],[$3])
 # If we have (and can build) fshooks.h
 #
 AC_DEFUN([LB_LINUX_FSHOOKS],
-[AC_MSG_CHECKING([if this compiler can build a SuSE 2.6 kernel])
-# an excerpt from fshooks.h, which doesn't build with fedora's gcc 3.4
-LB_LINUX_TRY_COMPILE([
-	/* for the lack of a kernel-wide definition */
-	typedef enum {
-	        false,
-	        true
-	} boolean_t __attribute__((__mode__(__QI__)));
-],[],[
-	AC_MSG_RESULT([yes])
-],[
-	AC_MSG_RESULT([no])
-	AC_MSG_WARN([We suggest trying gcc 3.3.x.])
-	AC_MSG_WARN([You can set CC=gcc33 before running configure.])
-	AC_MSG_ERROR([Your compiler cannot build a SuSE 2.6 kernel.])
-])
-AC_MSG_CHECKING([if fshooks are present])
-LB_LINUX_TRY_COMPILE([
-	#include <linux/fshooks.h>
-],[],[
-	AC_MSG_RESULT([yes])
+[AC_CHECK_FILE([$LINUX/include/linux/fshooks.h],[
+	AC_MSG_CHECKING([if fshooks.h can be compiled])
+	LB_LINUX_TRY_COMPILE([
+		#include <linux/fshooks.h>
+	],[],[
+		AC_MSG_RESULT([yes])
+	],[
+		AC_MSG_RESULT([no])
+		AC_MSG_WARN([You might have better luck with gcc 3.3.x.])
+		AC_MSG_WARN([You can set CC=gcc33 before running configure.])
+		AC_MSG_ERROR([Your compiler cannot build fshooks.h.])
+	])
 $1
 ],[
-	AC_MSG_RESULT([no])
 $2
 ])
 ])
diff --git a/build/autoconf/lustre-build.m4 b/build/autoconf/lustre-build.m4
index 7994f25ec4..4d9f666134 100644
--- a/build/autoconf/lustre-build.m4
+++ b/build/autoconf/lustre-build.m4
@@ -162,12 +162,15 @@ AC_DEFUN([LB_CONFIG_UTILS],
 [AC_MSG_CHECKING([whether to build utilities])
 AC_ARG_ENABLE([utils],
 	AC_HELP_STRING([--disable-utils],
-			[disable building of Lustre utility programs])
+			[disable building of Lustre utility programs]),
 	[],[enable_utils='yes'])
 if test x$with_cray_portals = xyes ; then
 	enable_utils='no'
 fi
 AC_MSG_RESULT([$enable_utils])
+if test x$enable_utils = xyes ; then 
+	LB_CONFIG_INIT_SCRIPTS
+fi
 ])
 
 #
-- 
GitLab