linux-configure-support-mandrake-kernel-patches-20011023
[openafs.git] / acinclude.m4
index 783173a..26107ce 100644 (file)
@@ -44,6 +44,9 @@ AC_ARG_ENABLE(redhat-buildsys,
 AC_ARG_ENABLE(transarc-paths,
 [  --enable-transarc-paths                     Use Transarc style paths like /usr/afs and /usr/vice],, enable_transarc_paths="no"
 )
+AC_ARG_ENABLE(tivoli-tsm,
+[  --enable-tivoli-tsm                 Enable use of the Tivoli TSM API libraries for butc support],, enable_tivoli_tsm="no"
+)
 
 AC_PROG_CC
 
@@ -119,10 +122,11 @@ case $system in
                AC_MSG_RESULT(linux)
                if test "x$enable_kernel_module" = "xyes"; then
                 ifdef([OPENAFS_CONFIGURE_LIBAFS],
-                  [LINUX_BUILD_VNODE_FROM_INODE(config,afs)],
-                  [LINUX_BUILD_VNODE_FROM_INODE(src/config,src/afs/LINUX)]
+                  [LINUX_BUILD_VNODE_FROM_INODE(src/config,afs)],
+                  [LINUX_BUILD_VNODE_FROM_INODE(${srcdir}/src/config,src/afs/LINUX,${srcdir}/src/afs/LINUX)]
                 )
                 LINUX_FS_STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK
+                LINUX_FS_STRUCT_INODE_HAS_I_TRUNCATE_SEM
                 LINUX_INODE_SETATTR_RETURN_TYPE
                 LINUX_NEED_RHCONFIG
                 LINUX_WHICH_MODULES
@@ -132,6 +136,9 @@ case $system in
                 if test "x$ac_cv_linux_fs_struct_address_space_has_page_lock" = "xyes"; then 
                  AC_DEFINE(STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK)
                 fi
+                if test "x$ac_cv_linux_fs_struct_inode_has_i_truncate_sem" = "xyes"; then 
+                 AC_DEFINE(STRUCT_INODE_HAS_I_TRUNCATE_SEM)
+                fi
                 :
                fi
                 ;;
@@ -225,6 +232,9 @@ else
                sparc-sun-solaris2.8)
                        AFS_SYSNAME="sun4x_58"
                        ;;
+               sparc-sun-solaris2.9)
+                       AFS_SYSNAME="sun4x_59"
+                       ;;
                alpha*-dec-osf4.0*)
                        AFS_SYSNAME="alpha_dux40"
                        ;;
@@ -383,6 +393,27 @@ if test "$enable_afsdb" = "yes"; then
        AC_DEFINE(AFS_AFSDB_ENV)
 fi
 
+dnl check for tivoli
+AC_MSG_CHECKING(for tivoli tsm butc support)
+XBSA_CFLAGS=""
+if test "$enable_tivoli_tsm" = "yes"; then
+       XBSADIR1=/usr/tivoli/tsm/client/api/bin/xopen
+       XBSADIR2=/opt/tivoli/tsm/client/api/bin/xopen
+
+       if test -e "$XBSADIR1/xbsa.h"; then
+               XBSA_CFLAGS="-Dxbsa -I$XBSADIR1"
+               AC_MSG_RESULT([yes, $XBSA_CFLAGS])
+       elif test -e "$XBSADIR2/xbsa.h"; then
+               XBSA_CFLAGS="-Dxbsa -I$XBSADIR2"
+               AC_MSG_RESULT([yes, $XBSA_CFLAGS])
+       else
+               AC_MSG_RESULT([no, missing xbsa.h header file])
+       fi
+else
+       AC_MSG_RESULT([no])
+fi
+AC_SUBST(XBSA_CFLAGS)
+
 dnl checks for header files.
 AC_HEADER_STDC
 AC_HEADER_SYS_WAIT
@@ -409,19 +440,18 @@ if test "x$enable_transarc_paths" = "xyes"  ; then
     afslocaldir=${afslocaldir=/usr/afs/local}
     afsbackupdir=${afsbackupdir=/usr/afs/backup}
     afsbosconfigdir=${afsbosconfigdir=/usr/afs/local}
-    else 
-    afsconfdir=${afsconfdir=\${sysconfdir\}/openafs/server}
-    viceetcdir=${viceetcdir=\${sysconfdir\}/openafs}
-    afskerneldir=${afskerneldir=\${libdir\}/openafs}
-    afssrvbindir=${afssrvbindir=\${bindir}}
-    afssrvsbindir=${afssrvsbindir=\${sbindir}}
-    afssrvlibexecdir=${afssrvlibexecdir=\${libexecdir\}/openafs}
-    afsdbdir=${afsdbdir=\${localstatedir\}/openafs/db}
-    afslogsdir=${afslogsdir=\${localstatedir\}/openafs/logs}
-    afslocaldir=${afslocaldir=\${localstatedir\}/openafs}
-    afsbackupdir=${afsbackupdir=\${localstatedir\}/openafs/backup}
-    afsbosconfigdir=${afsbosconfigdir=\${sysconfdir\}/openafs}
-
+else 
+    afsconfdir=${afsconfdir='${sysconfdir}/openafs/server'}
+    viceetcdir=${viceetcdir='${sysconfdir}/openafs'}
+    afskerneldir=${afskerneldir='${libdir}/openafs'}
+    afssrvbindir=${afssrvbindir='${bindir}'}
+    afssrvsbindir=${afssrvsbindir='${sbindir}'}
+    afssrvlibexecdir=${afssrvlibexecdir='${libexecdir}/openafs'}
+    afsdbdir=${afsdbdir='${localstatedir}/openafs/db'}
+    afslogsdir=${afslogsdir='${localstatedir}/openafs/logs'}
+    afslocaldir=${afslocaldir='${localstatedir}/openafs'}
+    afsbackupdir=${afsbackupdir='${localstatedir}/openafs/backup'}
+    afsbosconfigdir=${afsbosconfigdir='${sysconfdir}/openafs'}
 fi
 AC_SUBST(afsconfdir)
 AC_SUBST(viceetcdir)
@@ -445,6 +475,7 @@ AC_SUBST(LIB_AFSDB)
 AC_SUBST(LINUX_KERNEL_PATH)
 AC_SUBST(LINUX_VERSION)
 AC_SUBST(MKAFS_OSTYPE)
+AC_SUBST(TOP_OBJDIR)
 AC_SUBST(TOP_SRCDIR)
 AC_SUBST(TOP_INCDIR)
 AC_SUBST(TOP_LIBDIR)