configure-allow-enabling-vos-full-listvol-switch-20010721
[openafs.git] / configure.in
index 5087e39..67286e8 100644 (file)
@@ -21,6 +21,8 @@ AC_ARG_ENABLE( fast-restart,
 [  --enable-fast-restart               enable fast startup of file server without salvaging],, enable_fast_restart="no")
 AC_ARG_ENABLE( bitmap-later,
 [  --enable-bitmap-later               enable fast startup of file server by not reading bitmap till needed],, enable_bitmap_later="no")
+AC_ARG_ENABLE( full-vos-listvol-switch,
+[  --enable-full-vos-listvol-switch     enable vos full listvol switch for formatted output],, enable_full_vos_listvol_switch="no")
 AC_ARG_WITH(dux-kernel-headers,
 [  --with-dux-kernel-headers=path      use the kernel headers found at path(optional, defaults to first match in /usr/sys)]
 )
@@ -30,6 +32,9 @@ AC_ARG_WITH(linux-kernel-headers,
 AC_ARG_ENABLE(kernel-module,
 [  --disable-kernel-module                     disable compilation of the kernel module (defaults to enabled)],, enable_kernel_module="yes"
 )
+AC_ARG_ENABLE(redhat-buildsys,
+[  --enable-redhat-buildsys            enable compilation of the redhat build system kernel (defaults to disabled)],, enable_redhat_buildsys="no"
+)
 
 AC_PROG_CC
 
@@ -59,6 +64,9 @@ system=$host
 case $system in
         *-linux*)
                MKAFS_OSTYPE=LINUX
+               if test "x$enable_redhat_buildsys" = "xyes"; then
+                AC_DEFINE(ENABLE_REDHAT_BUILDSYS)
+               fi
                if test "x$enable_kernel_module" = "xyes"; then
                 if test "x$with_linux_kernel_headers" != "x"; then
                   LINUX_KERNEL_PATH="$with_linux_kernel_headers"
@@ -68,8 +76,19 @@ case $system in
                 if test -f "$LINUX_KERNEL_PATH/include/linux/version.h"; then
                  linux_kvers=`fgrep UTS_RELEASE $LINUX_KERNEL_PATH/include/linux/version.h |awk 'BEGIN { FS="\"" } { print $2 }'|tail -1`
                  if test "x$linux_kvers" = "x"; then
-                   AC_MSG_ERROR(Linux headers lack version definition)
-                   exit 1
+                   if test -f "$LINUX_KERNEL_PATH/include/linux/version-up.h"; then
+                     linux_kvers=`fgrep UTS_RELEASE $LINUX_KERNEL_PATH/include/linux/version-up.h |awk 'BEGIN { FS="\"" } { print $2 }'|tail -1`
+                     if test "x$linux_kvers" = "x"; then
+
+                       AC_MSG_ERROR(Linux headers lack version definition [2])
+                       exit 1
+                     else
+                       LINUX_VERSION="$linux_kvers"
+                      fi
+                    else
+                      AC_MSG_ERROR(Linux headers lack version definition)
+                     exit 1
+                   fi
                  else
                    LINUX_VERSION="$linux_kvers"
                  fi
@@ -110,6 +129,7 @@ case $system in
         *-solaris*)
                MKAFS_OSTYPE=SOLARIS
                 AC_MSG_RESULT(sun4)
+               SOLARIS_UFSVFS_HAS_DQRWLOCK
                 ;;
         *-hpux*)
                MKAFS_OSTYPE=HPUX
@@ -165,8 +185,11 @@ else
                hppa-hp-hpux10*)
                        AFS_SYSNAME="hp_ux102"
                        ;;
-               ppc-apple-darwin*)
-                       AFS_SYSNAME="ppc_darwin13"
+               powerpc-apple-darwin1.2*)
+                       AFS_SYSNAME="ppc_darwin_12"
+                       ;;
+               powerpc-apple-darwin1.3*)
+                       AFS_SYSNAME="ppc_darwin_13"
                        ;;
                sparc-sun-solaris2.5*)
                        AFS_SYSNAME="sun4x_55"
@@ -210,7 +233,7 @@ else
                power*-ibm-aix4.3*)
                        AFS_SYSNAME="rs_aix42"
                        ;;
-               default)
+               *)
                        AC_MSG_ERROR(An AFS sysname is required)
                        exit 1
                        ;;
@@ -218,6 +241,9 @@ else
        case $AFS_SYSNAME in
                *_linux*)
                        AFS_SYSKVERS=`echo $LINUX_VERSION | awk -F\. '{print $1 $2}'`
+                       if test "x${AFS_SYSKVERS}" = "x"; then
+                        AC_MSG_ERROR(Couldn't guess your Linux version. Please use the --with-afs-sysname option to configure an AFS sysname.)
+                       fi
                        _AFS_SYSNAME=`echo $AFS_SYSNAME|sed s/XX\$/$AFS_SYSKVERS/`
                        AFS_SYSNAME="$_AFS_SYSNAME"
                        ;;
@@ -309,6 +335,10 @@ if test "$enable_bitmap_later" = "yes"; then
        AC_DEFINE(BITMAP_LATER)
 fi
 
+if test "$enable_full_vos_listvol_switch" = "yes"; then
+       AC_DEFINE(FULL_LISTVOL_SWITCH)
+fi
+
 if test "$enable_bos_restricted_mode" = "yes"; then
        AC_DEFINE(BOS_RESTRICTED_MODE)
 fi
@@ -354,6 +384,9 @@ AC_SUBST(WITH_INSECURE)
 
 AC_OUTPUT(             \
 Makefile               \
+src/config/Makefile.version-NOCML \
 src/config/Makefile.${AFS_SYSNAME} \
 src/libafs/MakefileProto.${MKAFS_OSTYPE} \
+src/pam/Makefile \
+src/afsd/afs.ppc_darwin.plist \
 )